-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99ab2c5
commit 20a4975
Showing
2 changed files
with
8 additions
and
37 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
extern crate autocfg; | ||
|
||
use autocfg::AutoCfg; | ||
use std::env; | ||
|
||
fn main() { | ||
let autocfg = autocfg::new(); | ||
|
||
// If the "i128" feature is explicity requested, don't bother probing for it. | ||
// It will still cause a build error if that was set improperly. | ||
if env::var_os("CARGO_FEATURE_I128").is_some() || autocfg::new().probe_type("i128") { | ||
if env::var_os("CARGO_FEATURE_I128").is_some() || autocfg.probe_type("i128") { | ||
autocfg::emit("has_i128"); | ||
} | ||
|
||
// The RangeBounds trait was stabilized in 1.28, so from that version onwards we | ||
// implement that trait. | ||
AutoCfg::new().unwrap().emit_rustc_version(1, 28); | ||
autocfg.emit_rustc_version(1, 28); | ||
|
||
autocfg::rerun_path("build.rs"); | ||
} |
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