blob: c13ed1da485eb890ad45b6ddc39a74f23b36b261 [file] [log] [blame]
James Kuszmaul3b15b0c2022-11-08 14:03:16 -08001use rustc_version::{version_meta, Channel};
2
3fn main() {
4 let version_meta = version_meta().unwrap();
5
6 // To use nightly features we declare this and then we can use
7 // #[cfg(nightly)]
8 // for nightly only features
9 if version_meta.channel == Channel::Nightly {
10 println!("cargo:rustc-cfg=nightly")
11 }
12}