From 3ca0820ff5d47f948b8509185a058bdf58d336c2 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Sun, 11 Feb 2024 23:57:37 +0000 Subject: [PATCH 1/3] Fix clippy warnings --- src/map.rs | 4 ++-- src/set.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/map.rs b/src/map.rs index 9cd768f20..d7b456034 100644 --- a/src/map.rs +++ b/src/map.rs @@ -6805,7 +6805,7 @@ mod test_map { assert_eq!(m2.len(), 2); } - thread_local! { static DROP_VECTOR: RefCell> = RefCell::new(Vec::new()) } + thread_local! { static DROP_VECTOR: RefCell> = const { RefCell::new(Vec::new()) } } #[derive(Hash, PartialEq, Eq)] struct Droppable { @@ -8524,7 +8524,7 @@ mod test_map { #[test] #[should_panic = "panic in clone"] fn test_clone_from_memory_leaks() { - use ::alloc::vec::Vec; + use alloc::vec::Vec; struct CheckedClone { panic_in_clone: bool, diff --git a/src/set.rs b/src/set.rs index fdff46d88..c16948e3b 100644 --- a/src/set.rs +++ b/src/set.rs @@ -2820,7 +2820,7 @@ mod test_set { assert_eq!(last_i, 49); } - for _ in &s { + if !s.is_empty() { panic!("s should be empty!"); } @@ -2834,6 +2834,7 @@ mod test_set { use core::hash; #[derive(Debug)] + #[allow(dead_code)] struct Foo(&'static str, i32); impl PartialEq for Foo { From 5dc7a7132d9f3665b7ad88eb7245a5300a6961dd Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Mon, 12 Feb 2024 00:23:46 +0000 Subject: [PATCH 2/3] Allow internal_features for likely/unlikely --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 6e9592abe..f03ddb6ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,6 +37,7 @@ #![warn(missing_docs)] #![warn(rust_2018_idioms)] #![cfg_attr(feature = "nightly", warn(fuzzy_provenance_casts))] +#![cfg_attr(feature = "nightly", allow(internal_features))] #[cfg(test)] #[macro_use] From 7c41f5d0415519299b18f64a80dd4d0787e0dce1 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Mon, 12 Feb 2024 11:34:40 +0000 Subject: [PATCH 3/3] Update CI to use 1.72 --- .github/workflows/rust.yml | 6 +++--- ci/run.sh | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d700f8104..bc3433f5d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -58,7 +58,7 @@ jobs: thumbv6m-none-eabi, x86_64-pc-windows-gnu, ] - channel: [1.63.0, nightly] + channel: [1.72.0, nightly] include: - os: macos-latest target: x86_64-apple-darwin @@ -68,10 +68,10 @@ jobs: channel: nightly - os: macos-latest target: x86_64-apple-darwin - channel: 1.63.0 + channel: 1.72.0 - os: windows-latest target: x86_64-pc-windows-msvc - channel: 1.63.0 + channel: 1.72.0 - os: ubuntu-latest target: x86_64-unknown-linux-gnu channel: beta diff --git a/ci/run.sh b/ci/run.sh index 3d14c780a..6c692345c 100644 --- a/ci/run.sh +++ b/ci/run.sh @@ -16,9 +16,6 @@ if [ "${CHANNEL}" = "nightly" ]; then FEATURES="${FEATURES},nightly" export RUSTFLAGS="$RUSTFLAGS -D warnings" fi -if [ "${CHANNEL}" = "1.63.0" ]; then - cargo update --package allocator-api2 --precise 0.2.9 -fi CARGO=cargo if [ "${CROSS}" = "1" ]; then