-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(client): place the use of new rust features behind cfg
- Loading branch information
1 parent
97f4243
commit 9f8add6
Showing
5 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters