diff --git a/build.rs b/build.rs index a0a54620..abe44c42 100644 --- a/build.rs +++ b/build.rs @@ -5,6 +5,7 @@ const NIGHTLY: bool = true; const NIGHTLY: bool = false; fn main() { + println!("cargo::rustc-check-cfg=cfg(nightly)"); // Set cfg flags depending on release channel if NIGHTLY { println!("cargo:rustc-cfg=nightly"); diff --git a/may_queue/build.rs b/may_queue/build.rs index a0a54620..abe44c42 100644 --- a/may_queue/build.rs +++ b/may_queue/build.rs @@ -5,6 +5,7 @@ const NIGHTLY: bool = true; const NIGHTLY: bool = false; fn main() { + println!("cargo::rustc-check-cfg=cfg(nightly)"); // Set cfg flags depending on release channel if NIGHTLY { println!("cargo:rustc-cfg=nightly"); diff --git a/may_queue/src/mpsc.rs b/may_queue/src/mpsc.rs index da007dab..78e9ceec 100755 --- a/may_queue/src/mpsc.rs +++ b/may_queue/src/mpsc.rs @@ -27,6 +27,7 @@ struct Slot { impl std::panic::RefUnwindSafe for Slot {} impl Slot { + #[allow(clippy::declare_interior_mutable_const)] const UNINIT: Self = Self { value: UnsafeCell::new(MaybeUninit::uninit()), ready: AtomicUsize::new(0), diff --git a/may_queue/src/spmc.rs b/may_queue/src/spmc.rs index e12f8fca..c359387c 100644 --- a/may_queue/src/spmc.rs +++ b/may_queue/src/spmc.rs @@ -24,6 +24,7 @@ struct Slot { } impl Slot { + #[allow(clippy::declare_interior_mutable_const)] const UNINIT: Self = Self { value: UnsafeCell::new(MaybeUninit::uninit()), }; diff --git a/may_queue/src/spsc.rs b/may_queue/src/spsc.rs index 76947d7b..c59e3b59 100644 --- a/may_queue/src/spsc.rs +++ b/may_queue/src/spsc.rs @@ -24,6 +24,7 @@ struct Slot { } impl Slot { + #[allow(clippy::declare_interior_mutable_const)] const UNINIT: Self = Self { value: UnsafeCell::new(MaybeUninit::uninit()), };