2 let cfg = match autocfg::AutoCfg::new() {
5 // If we couldn't detect the compiler version and features, just
6 // print a warning. This isn't a fatal error: we can still build
7 // Slab, we just can't enable cfgs automatically.
9 "cargo:warning=slab: failed to detect compiler features: {}",
15 // Note that this is `no_`*, not `has_*`. This allows treating as the latest
16 // stable rustc is used when the build script doesn't run. This is useful
17 // for non-cargo build systems that don't run the build script.
18 if !cfg.probe_rustc_version(1, 39) {
19 println!("cargo:rustc-cfg=slab_no_const_vec_new");
21 if !cfg.probe_rustc_version(1, 46) {
22 println!("cargo:rustc-cfg=slab_no_track_caller");