From c87faeb706e6bd88ca87e0afa65ba4cc84541187 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 15 Feb 2017 08:46:48 -0800 Subject: [PATCH] Add ability to be used in rustc I'm prototyping support for pulling in crates.io crates into rustc and I believe this'll be the support necessary for living in the sysroot. --- env/src/lib.rs | 5 +++++ src/lib.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/env/src/lib.rs b/env/src/lib.rs index 9105c19..23710c7 100644 --- a/env/src/lib.rs +++ b/env/src/lib.rs @@ -130,6 +130,11 @@ html_root_url = "http://doc.rust-lang.org/env_logger/")] #![cfg_attr(test, deny(warnings))] +// When compiled for the rustc compiler itself we want to make sure that this is +// an unstable crate +#![cfg_attr(rustbuild, feature(staged_api, rustc_private))] +#![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] + extern crate log; use std::env; diff --git a/src/lib.rs b/src/lib.rs index 431c70f..6c222ba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -192,6 +192,11 @@ #![cfg_attr(not(feature = "use_std"), no_std)] +// When compiled for the rustc compiler itself we want to make sure that this is +// an unstable crate +#![cfg_attr(rustbuild, feature(staged_api, rustc_private))] +#![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] + #[cfg(not(feature = "use_std"))] extern crate core as std;