extern crate rustc_version;
use rustc_version::{version_meta, Channel};
fn main() {
let version_info = match version_meta() {
Ok(v) => v,
Err(e) => panic!("could not identify rustc version. error: {:?}", e),
};
match version_info.channel {
Channel::Beta | Channel::Stable => {
panic!("this crate is not supported on the stable, or beta versions");
}
_ => {}
};
if version_info.semver.major > 1 {
panic!("please update this crate with the breaking rustc 2.0 changes.")
} else if version_info.semver.minor >= 46 {
} else {
println!(r#"cargo:rustc-cfg=feature="OLD_ASM""#);
}
}