mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
4d314065a4
This reverts commit 30d7ed4c47.
It should not be needed any more.
13 lines
482 B
Rust
13 lines
482 B
Rust
fn main() {
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
println!("cargo:rustc-check-cfg=cfg(enable_unstable_features)");
|
|
|
|
let rustc = std::env::var("RUSTC").unwrap_or_else(|_| "rustc".into());
|
|
let version = std::process::Command::new(rustc).arg("-vV").output().unwrap();
|
|
let stdout = String::from_utf8(version.stdout).unwrap();
|
|
|
|
if stdout.contains("nightly") || stdout.contains("dev") {
|
|
println!("cargo:rustc-cfg=enable_unstable_features");
|
|
}
|
|
}
|