diff --git a/src/lib.rs b/src/lib.rs index 6e9592abe..14aa246eb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,6 +10,7 @@ //! [CppCon talk]: https://www.youtube.com/watch?v=ncHmEUmJZf4 #![no_std] +#![cfg_attr(feature = "nightly", allow(internal_features))] #![cfg_attr( feature = "nightly", feature( diff --git a/src/map.rs b/src/map.rs index 9cd768f20..80025f1c4 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 { diff --git a/src/set.rs b/src/set.rs index 2f4a97c9d..3901ba7f1 100644 --- a/src/set.rs +++ b/src/set.rs @@ -2811,7 +2811,7 @@ mod test_set { assert_eq!(last_i, 49); } - for _ in &s { + if s.iter().next().is_some() { panic!("s should be empty!"); } @@ -2825,6 +2825,7 @@ mod test_set { use core::hash; #[derive(Debug)] + #[allow(dead_code)] struct Foo(&'static str, i32); impl PartialEq for Foo {