extern crate rustc_version; fn main() { if rustc_version::version_meta().unwrap().channel <= rustc_version::Channel::Nightly { println!("cargo:rustc-cfg=nightly"); } }