From 5049a97111ef24e50a694d81c787af4c8b09b430 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 21 Feb 2019 10:55:30 -0800 Subject: [PATCH] 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 --- src/lib.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3fddb3f504b0f..3c987eab80d3e 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;