summaryrefslogtreecommitdiffstats
path: root/vendor/memoffset/build.rs
blob: 0604c1954efbf2b0e3a02dcbb4f90099b259422d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
extern crate autocfg;

fn main() {
    let ac = autocfg::new();

    // Check for a minimum version for a few features
    if ac.probe_rustc_version(1, 20) {
        println!("cargo:rustc-cfg=tuple_ty");
    }
    if ac.probe_rustc_version(1, 31) {
        println!("cargo:rustc-cfg=allow_clippy");
    }
    if ac.probe_rustc_version(1, 36) {
        println!("cargo:rustc-cfg=maybe_uninit");
    }
    if ac.probe_rustc_version(1, 40) {
        println!("cargo:rustc-cfg=doctests");
    }
    if ac.probe_rustc_version(1, 51) {
        println!("cargo:rustc-cfg=raw_ref_macros");
    }
}