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.
This commit is contained in:
bors 2016-08-02 23:32:31 -07:00 committed by GitHub
commit ea07d52676

View File

@ -74,6 +74,8 @@
//! ```
#![stable(feature = "rust1", since = "1.0.0")]
#![cfg_attr(not(target_has_atomic = "8"), allow(dead_code))]
#![cfg_attr(not(target_has_atomic = "8"), allow(unused_imports))]
use self::Ordering::*;