Skip to content

Commit ea07d52

Browse files
authored
Auto merge of #35176 - japaric:no-atomics, r=alexcrichton
core: fix `cargo build` for targets with "max-atomic-width": 0 This crate was failing to compile due to dead_code/unused_imports warnings. This commits disables these two lints for these targets. --- r? @alexcrichton cc @Amanieu is `cfg(target_has_atomic = "8")` the right `cfg` to use? I think that all targets that support some form of atomics will at a minimum support byte level atomics. FWIW, the only thing that's left in `sync::atomic` for these targets is `Ordering` and the `fence` function.
2 parents f495483 + 5f80104 commit ea07d52

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libcore/sync/atomic.rs

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
//! ```
7575
7676
#![stable(feature = "rust1", since = "1.0.0")]
77+
#![cfg_attr(not(target_has_atomic = "8"), allow(dead_code))]
78+
#![cfg_attr(not(target_has_atomic = "8"), allow(unused_imports))]
7779

7880
use self::Ordering::*;
7981

0 commit comments

Comments
 (0)