Skip to content

Commit

Permalink
Merge pull request #384 from dtolnay/minormax
Browse files Browse the repository at this point in the history
If version detection fails, build with modernest stable features
  • Loading branch information
dtolnay authored May 17, 2023
2 parents 2c1b102 + a8db10f commit 682630b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@
use std::env;
use std::process::{self, Command};
use std::str;
use std::u32;

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

let version = match rustc_version() {
Some(version) => version,
None => return,
};
let version = rustc_version().unwrap_or(RustcVersion {
minor: u32::MAX,
nightly: false,
});

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

0 comments on commit 682630b

Please sign in to comment.