build.rs@2b13f8a0c8ba
build.rs
Mon, 12 May 2025 20:40:14 -0500
- author
- Tuomo Valkonen <tuomov@iki.fi>
- date
- Mon, 12 May 2025 20:40:14 -0500
- branch
- dev
- changeset 133
- 2b13f8a0c8ba
- parent 94
-
1f19c6bbf07b
- permissions
- -rw-r--r--
Replace Instance ref_instance and decompose by eval_* for flexibility
use rustc_version::{version_meta, Channel};
fn main() {
// Tell rust that nightly flag exists
println!("cargo::rustc-check-cfg=cfg(nightly)");
if version_meta().unwrap().channel == Channel::Nightly {
// … and set it for nightly.
println!("cargo:rustc-cfg=nightly");
}
}