Skip to content

Commit

Permalink
📝 fix cfg nightly warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Jun 4, 2024
1 parent ce0a51a commit d506173
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions may_queue/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions may_queue/src/mpsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ struct Slot<T> {
impl<T> std::panic::RefUnwindSafe for Slot<T> {}

impl<T> Slot<T> {
#[allow(clippy::declare_interior_mutable_const)]
const UNINIT: Self = Self {
value: UnsafeCell::new(MaybeUninit::uninit()),
ready: AtomicUsize::new(0),
Expand Down
1 change: 1 addition & 0 deletions may_queue/src/spmc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct Slot<T> {
}

impl<T> Slot<T> {
#[allow(clippy::declare_interior_mutable_const)]
const UNINIT: Self = Self {
value: UnsafeCell::new(MaybeUninit::uninit()),
};
Expand Down
1 change: 1 addition & 0 deletions may_queue/src/spsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct Slot<T> {
}

impl<T> Slot<T> {
#[allow(clippy::declare_interior_mutable_const)]
const UNINIT: Self = Self {
value: UnsafeCell::new(MaybeUninit::uninit()),
};
Expand Down

0 comments on commit d506173

Please sign in to comment.