summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-02-21 20:52:11 +0000
committerbors <bors@rust-lang.org>2019-02-21 20:52:11 +0000
commitfecc1fd607a55c3602eacb0b27c35db46feb6943 (patch)
treedded2394e2ceecafcc17b8ce4488d59514e9c65c
parent577fdc86b239f1909645e60ef6a79f5e7f76b783 (diff)
parent5049a97111ef24e50a694d81c787af4c8b09b430 (diff)
downloadrust-libc-fecc1fd607a55c3602eacb0b27c35db46feb6943.tar.gz
Auto merge of #1268 - alexcrichton:fix-features, r=gnzlbg
Fix build of `rustc-dep-of-std` feature Enusre that `no_core` is turned on, and while here update the `no_std` header to be unconditionally applied. Closes #1267
-rw-r--r--src/lib.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 3fddb3f504..3c987eab80 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -20,17 +20,11 @@
// Enable extra lints:
#![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))]
#![deny(missing_copy_implementations, safe_packed_borrows)]
-// Enable no_std:
-#![cfg_attr(
- not(any(
- feature = "use_std",
- feature = "rustc-dep-of-std",
- )),
- no_std
-)]
+#![no_std]
+#![cfg_attr(feature = "rustc-dep-of-std", no_core)]
#[cfg(feature = "use_std")]
-extern crate std as core;
+extern crate std;
#[macro_use]
mod macros;