chore(client): place the use of new rust features behind cfg
This commit is contained in:
committed by
Sean McArthur
parent
97f4243a59
commit
9f8add6056
14
build.rs
Normal file
14
build.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
extern crate rustc_version;
|
||||
use rustc_version::{version, Version};
|
||||
|
||||
fn main() {
|
||||
|
||||
// Check for a minimum version to see if new rust features can be used
|
||||
let version = version().unwrap();
|
||||
if version >= Version::parse("1.26.0").unwrap() {
|
||||
println!("cargo:rustc-cfg=impl_trait_available");
|
||||
}
|
||||
if version >= Version::parse("1.23.0").unwrap() {
|
||||
println!("cargo:rustc-cfg=inherent_ascii");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user