Skip to content

Commit 682630b

Browse files
authored
Merge pull request #384 from dtolnay/minormax
If version detection fails, build with modernest stable features
2 parents 2c1b102 + a8db10f commit 682630b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@
4343
use std::env;
4444
use std::process::{self, Command};
4545
use std::str;
46+
use std::u32;
4647

4748
fn main() {
4849
println!("cargo:rerun-if-changed=build.rs");
4950

50-
let version = match rustc_version() {
51-
Some(version) => version,
52-
None => return,
53-
};
51+
let version = rustc_version().unwrap_or(RustcVersion {
52+
minor: u32::MAX,
53+
nightly: false,
54+
});
5455

5556
if version.minor < 31 {
5657
eprintln!("Minimum supported rustc version is 1.31");

0 commit comments

Comments
 (0)