build.rs@f75bf34adda0
build.rs
Sun, 11 May 2025 02:03:45 -0500
- author
- Tuomo Valkonen <tuomov@iki.fi>
- date
- Sun, 11 May 2025 02:03:45 -0500
- branch
- dev
- changeset 128
- f75bf34adda0
- parent 94
-
1f19c6bbf07b
- permissions
- -rw-r--r--
Switch from Cow to MyCow for DifferentiableImpl to avoid Clone trait bound
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");
}
}