Allow warnings in doctests to fix tests with Rust 1.70

epel9 imports/e9/rust-time0.2-0.2.27-5.el9
Fabio Valentini 2 years ago
parent 926172d198
commit 0db8ea6fb2
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -0,0 +1,24 @@
From 639f0aca75b0dadaedf84520bc46b87c6c3e210e Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Thu, 8 Jun 2023 15:25:24 +0200
Subject: [PATCH] deny(warnings) considered harmful
---
src/lib.rs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/lib.rs b/src/lib.rs
index 22fadd5..ce843a6 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -173,7 +173,6 @@
)]
#![doc(html_favicon_url = "https://avatars0.githubusercontent.com/u/55999857")]
#![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/55999857")]
-#![doc(test(attr(deny(warnings))))]
#[cfg(not(feature = "std"))]
extern crate alloc;
--
2.40.1

@ -1,32 +1,29 @@
# Generated by rust2rpm 18 # Generated by rust2rpm 24
%bcond_without check %bcond_without check
%global debug_package %{nil} %global debug_package %{nil}
%global crate time %global crate time
Name: rust-%{crate}0.2 Name: rust-time0.2
Version: 0.2.27 Version: 0.2.27
Release: %autorelease Release: %autorelease
Summary: Date and time library Summary: Date and time library
# Upstream license specification: MIT OR Apache-2.0 License: MIT OR Apache-2.0
License: MIT or ASL 2.0
URL: https://crates.io/crates/time URL: https://crates.io/crates/time
Source: %{crates_source} Source: %{crates_source}
# Initial patched metadata # Automatically generated patch to strip foreign dependencies
Patch: time-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * drop windows- and WASM-specific dependencies # * drop windows- and WASM-specific dependencies
Patch0: time-fix-metadata.diff Patch: time-fix-metadata.diff
Patch: 0001-deny-warnings-considered-harmful.patch
ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging >= 21
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand: %global _description %{expand:
Date and time library. Fully interoperable with the standard library. Mostly Date and time library. Fully interoperable with the standard library.
compatible with #![no_std].} Mostly compatible with #![no_std].}
%description %{_description} %description %{_description}
@ -36,13 +33,15 @@ BuildArch: noarch
%description devel %{_description} %description devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "%{crate}" crate. use the "%{crate}" crate.
%files devel %files devel
%license LICENSE-MIT LICENSE-Apache %license %{crate_instdir}/LICENSE-Apache
%doc README.md CHANGELOG.md %license %{crate_instdir}/LICENSE-MIT
%{cargo_registry}/%{crate}-%{version_no_tilde}/ %doc %{crate_instdir}/CHANGELOG.md
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel %package -n %{name}+default-devel
Summary: %{summary} Summary: %{summary}
@ -50,11 +49,11 @@ BuildArch: noarch
%description -n %{name}+default-devel %{_description} %description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "default" feature of "%{crate}" crate. use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel %files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+deprecated-devel %package -n %{name}+deprecated-devel
Summary: %{summary} Summary: %{summary}
@ -62,11 +61,11 @@ BuildArch: noarch
%description -n %{name}+deprecated-devel %{_description} %description -n %{name}+deprecated-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "deprecated" feature of "%{crate}" crate. use the "deprecated" feature of the "%{crate}" crate.
%files -n %{name}+deprecated-devel %files -n %{name}+deprecated-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+libc-devel %package -n %{name}+libc-devel
Summary: %{summary} Summary: %{summary}
@ -74,11 +73,11 @@ BuildArch: noarch
%description -n %{name}+libc-devel %{_description} %description -n %{name}+libc-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "libc" feature of "%{crate}" crate. use the "libc" feature of the "%{crate}" crate.
%files -n %{name}+libc-devel %files -n %{name}+libc-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+panicking-api-devel %package -n %{name}+panicking-api-devel
Summary: %{summary} Summary: %{summary}
@ -86,11 +85,11 @@ BuildArch: noarch
%description -n %{name}+panicking-api-devel %{_description} %description -n %{name}+panicking-api-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "panicking-api" feature of "%{crate}" crate. use the "panicking-api" feature of the "%{crate}" crate.
%files -n %{name}+panicking-api-devel %files -n %{name}+panicking-api-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+rand-devel %package -n %{name}+rand-devel
Summary: %{summary} Summary: %{summary}
@ -98,11 +97,11 @@ BuildArch: noarch
%description -n %{name}+rand-devel %{_description} %description -n %{name}+rand-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "rand" feature of "%{crate}" crate. use the "rand" feature of the "%{crate}" crate.
%files -n %{name}+rand-devel %files -n %{name}+rand-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+serde-devel %package -n %{name}+serde-devel
Summary: %{summary} Summary: %{summary}
@ -110,11 +109,11 @@ BuildArch: noarch
%description -n %{name}+serde-devel %{_description} %description -n %{name}+serde-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "serde" feature of "%{crate}" crate. use the "serde" feature of the "%{crate}" crate.
%files -n %{name}+serde-devel %files -n %{name}+serde-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+std-devel %package -n %{name}+std-devel
Summary: %{summary} Summary: %{summary}
@ -122,11 +121,11 @@ BuildArch: noarch
%description -n %{name}+std-devel %{_description} %description -n %{name}+std-devel %{_description}
This package contains library source intended for building other packages This package contains library source intended for building other packages which
which use "std" feature of "%{crate}" crate. use the "std" feature of the "%{crate}" crate.
%files -n %{name}+std-devel %files -n %{name}+std-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%prep %prep
%autosetup -n %{crate}-%{version_no_tilde} -p1 %autosetup -n %{crate}-%{version_no_tilde} -p1

@ -0,0 +1,19 @@
--- time-0.2.27/Cargo.toml 1970-01-01T00:00:00+00:00
+++ time-0.2.27/Cargo.toml 2023-06-08T13:23:54.482950+00:00
@@ -64,15 +64,7 @@
default = ["deprecated", "std"]
deprecated = []
panicking-api = []
-std = ["libc", "winapi", "stdweb", "standback/std"]
-[target."cfg(target_arch = \"wasm32\")".dependencies.stdweb]
-version = "0.4.20"
-optional = true
-default-features = false
+std = ["libc", "stdweb", "standback/std"]
[target."cfg(unix)".dependencies.libc]
version = "0.2.89"
optional = true
-[target."cfg(windows)".dependencies.winapi]
-version = "0.3.9"
-features = ["minwinbase", "minwindef", "timezoneapi"]
-optional = true

@ -1,19 +1,11 @@
--- time-0.2.27/Cargo.toml 1970-01-01T00:00:00+00:00 --- time-0.2.27/Cargo.toml 1970-01-01T00:00:00+00:00
+++ time-0.2.27/Cargo.toml 2021-11-18T12:38:26.252737+00:00 +++ time-0.2.27/Cargo.toml 2023-06-08T13:24:21.796057+00:00
@@ -64,15 +64,7 @@ @@ -64,7 +64,7 @@
default = ["deprecated", "std"] default = ["deprecated", "std"]
deprecated = [] deprecated = []
panicking-api = [] panicking-api = []
-std = ["libc", "winapi", "stdweb", "standback/std"] -std = ["libc", "stdweb", "standback/std"]
-[target."cfg(target_arch = \"wasm32\")".dependencies.stdweb]
-version = "0.4.20"
-optional = true
-default-features = false
+std = ["libc", "standback/std"] +std = ["libc", "standback/std"]
[target."cfg(unix)".dependencies.libc] [target."cfg(unix)".dependencies.libc]
version = "0.2.89" version = "0.2.89"
optional = true optional = true
-[target."cfg(windows)".dependencies.winapi]
-version = "0.3.9"
-features = ["minwinbase", "minwindef", "timezoneapi"]
-optional = true

Loading…
Cancel
Save