1 use autocfg::AutoCfg;
2 
main()3 fn main() {
4     match AutoCfg::new() {
5         Ok(ac) => {
6             // The #[track_caller] attribute was stabilized in rustc 1.46.0.
7             if ac.probe_rustc_version(1, 46) {
8                 autocfg::emit("tokio_track_caller")
9             }
10         }
11 
12         Err(e) => {
13             // If we couldn't detect the compiler version and features, just
14             // print a warning. This isn't a fatal error: we can still build
15             // Tokio, we just can't enable cfgs automatically.
16             println!(
17                 "cargo:warning=tokio: failed to detect compiler features: {}",
18                 e
19             );
20         }
21     }
22 }
23