check `int_to_from_bytes` feature on stable channel
This commit is contained in:
parent
05f660c03d
commit
45c399ffa7
10
build.rs
10
build.rs
|
@ -11,10 +11,16 @@ fn main() {
|
||||||
panic!("i128 support was not detected!");
|
panic!("i128 support was not detected!");
|
||||||
}
|
}
|
||||||
|
|
||||||
match rustc_version::version() {
|
match rustc_version::version_meta() {
|
||||||
Ok(ref version) if version.major >= 1 && version.minor >= 32 => {
|
Ok(ref meta) if meta.semver.major >= 1 && meta.semver.minor >= 32 => {
|
||||||
println!("cargo:rustc-cfg=int_to_from_bytes");
|
println!("cargo:rustc-cfg=int_to_from_bytes");
|
||||||
}
|
}
|
||||||
|
Ok(ref meta)
|
||||||
|
if env::var_os("CARGO_FEATURE_INT_TO_FROM_BYTES").is_some()
|
||||||
|
&& meta.channel == rustc_version::Channel::Stable =>
|
||||||
|
{
|
||||||
|
panic!("`int_to_from_bytes` support was not stabilizations!");
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue