#![warn(rust_2018_idioms, single_use_lifetimes)]
mod version;
use version::{rustc_version, Version};
fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=version.rs");
let version = match rustc_version() {
Some(version) => version,
None => {
println!(
"cargo:warning={}: unable to determine rustc version; assuming latest stable rustc (1.{})",
env!("CARGO_PKG_NAME"),
Version::LATEST.minor
);
Version::LATEST
}
};
if !version.probe(46, 2020, 7, 1) {
println!("cargo:rustc-cfg=portable_atomic_no_track_caller");
}
}