diff --git a/build.rs b/build.rs index 3ee8a9fc..fd856d4b 100644 --- a/build.rs +++ b/build.rs @@ -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");