diff --git a/build.rs b/build.rs index 6465fcc..17305e0 100644 --- a/build.rs +++ b/build.rs @@ -6,7 +6,7 @@ fn main() { let meta = version_meta().unwrap(); - let use_feature = meta.channel == Channel::Nightly || std::env::var("RUSTC_BOOTSTRAP").is_ok(); + let use_feature = meta.channel == Channel::Nightly || option_env!("RUSTC_BOOTSTRAP").is_some(); if use_feature { // Use this cfg option to control whether we should enable features that are already stable // in some new Rust versions, but are available as unstable features in older Rust versions diff --git a/internal/build.rs b/internal/build.rs index b8faf9f..68566c9 100644 --- a/internal/build.rs +++ b/internal/build.rs @@ -5,7 +5,7 @@ fn main() { let meta = version_meta().unwrap(); - let use_feature = meta.channel == Channel::Nightly || std::env::var("RUSTC_BOOTSTRAP").is_ok(); + let use_feature = meta.channel == Channel::Nightly || option_env!("RUSTC_BOOTSTRAP").is_some(); if use_feature { println!("cargo:rustc-cfg=USE_RUSTC_FEATURES"); }