From ceab2c8e0813ec04db27cfbecbef305b4dd0bacc Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 9 Oct 2023 01:20:06 +0200 Subject: [PATCH] Remove redundant clone() call to fix builds with Rust 1.73+ --- ...-clone-call-to-fix-builds-with-Rust-.patch | 25 +++++++++++++++++++ rust-crossbeam-epoch.spec | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 0001-Remove-redundant-clone-call-to-fix-builds-with-Rust-.patch diff --git a/0001-Remove-redundant-clone-call-to-fix-builds-with-Rust-.patch b/0001-Remove-redundant-clone-call-to-fix-builds-with-Rust-.patch new file mode 100644 index 0000000..4015523 --- /dev/null +++ b/0001-Remove-redundant-clone-call-to-fix-builds-with-Rust-.patch @@ -0,0 +1,25 @@ +From 1cead3c1acf440d13bfa09a636a70531337f170d Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Mon, 9 Oct 2023 01:19:01 +0200 +Subject: [PATCH] Remove redundant clone() call to fix builds with Rust 1.73+ + +--- + src/guard.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/guard.rs b/src/guard.rs +index ba7fe1b..32c82e6 100644 +--- a/src/guard.rs ++++ b/src/guard.rs +@@ -448,7 +448,7 @@ impl fmt::Debug for Guard { + /// a.load(Relaxed, epoch::unprotected()); + /// + /// // It's possible to create more dummy guards by calling `clone()`. +-/// let dummy = &epoch::unprotected().clone(); ++/// let dummy = &epoch::unprotected(); + /// + /// dummy.defer(move || { + /// println!("This gets executed immediately."); +-- +2.41.0 + diff --git a/rust-crossbeam-epoch.spec b/rust-crossbeam-epoch.spec index 411ecd3..3a5de20 100644 --- a/rust-crossbeam-epoch.spec +++ b/rust-crossbeam-epoch.spec @@ -17,6 +17,8 @@ Patch: crossbeam-epoch-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * drop unstable-only dependency on loom Patch: crossbeam-epoch-fix-metadata.diff +# * remove redundant clone() call to fix builds with Rust 1.73+ +Patch: 0001-Remove-redundant-clone-call-to-fix-builds-with-Rust-.patch BuildRequires: rust-packaging >= 21