• Home
  • Raw
  • Download

Lines Matching +full:compiler +full:- +full:version

2 // SPDX-License-Identifier: MIT OR Apache-2.0
9 // The rustc-cfg strings below are *not* public API. Please let us know by
13 let compiler = match rustc_version() { in main() localVariable
14 Some(compiler) => compiler, in main()
19 // Adding a new cfg gated by Rust version MUST be accompanied by an addition to the matrix in in main()
21 if compiler.minor >= 44 { in main()
22 println!("cargo:rustc-cfg=path_buf_capacity"); in main()
24 if compiler.minor >= 56 { in main()
25 println!("cargo:rustc-cfg=shrink_to"); in main()
30 if (compiler.minor >= 63 in main()
31 && (compiler.channel == ReleaseChannel::Stable || compiler.channel == ReleaseChannel::Beta)) in main()
32 || compiler.minor >= 64 in main()
34 println!("cargo:rustc-cfg=try_reserve_2"); in main()
37 if (compiler.minor >= 68 in main()
38 && (compiler.channel == ReleaseChannel::Stable || compiler.channel == ReleaseChannel::Beta)) in main()
39 || compiler.minor >= 69 in main()
41 println!("cargo:rustc-cfg=path_buf_deref_mut"); in main()
45 struct Compiler { struct
57 fn rustc_version() -> Option<Compiler> { in rustc_version() argument
59 let output = Command::new(rustc).arg("--version").output().ok()?; in rustc_version()
60 let version = str::from_utf8(&output.stdout).ok()?; in rustc_version() localVariable
61 let mut pieces = version.split('.'); in rustc_version()
66 let channel = if version.contains("nightly") { in rustc_version()
68 } else if version.contains("beta") { in rustc_version()
73 Some(Compiler { minor, channel }) in rustc_version()