File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -2,16 +2,11 @@ fn main() {
22 println ! ( "cargo:rerun-if-changed=build.rs" ) ;
33 println ! ( "cargo:rustc-check-cfg=cfg(enable_unstable_features)" ) ;
44
5- // Miri testing uses unstable features, so always enable that for its sysroot.
6- // Otherwise, only enable unstable if rustc looks like a nightly or dev build.
7- let enable_unstable_features = std:: env:: var ( "MIRI_CALLED_FROM_SETUP" ) . is_ok ( ) || {
8- let rustc = std:: env:: var ( "RUSTC" ) . unwrap_or_else ( |_| "rustc" . into ( ) ) ;
9- let version = std:: process:: Command :: new ( rustc) . arg ( "-vV" ) . output ( ) . unwrap ( ) ;
10- let stdout = String :: from_utf8 ( version. stdout ) . unwrap ( ) ;
11- stdout. contains ( "nightly" ) || stdout. contains ( "dev" )
12- } ;
5+ let rustc = std:: env:: var ( "RUSTC" ) . unwrap_or_else ( |_| "rustc" . into ( ) ) ;
6+ let version = std:: process:: Command :: new ( rustc) . arg ( "-vV" ) . output ( ) . unwrap ( ) ;
7+ let stdout = String :: from_utf8 ( version. stdout ) . unwrap ( ) ;
138
14- if enable_unstable_features {
9+ if stdout . contains ( "nightly" ) || stdout . contains ( "dev" ) {
1510 println ! ( "cargo:rustc-cfg=enable_unstable_features" ) ;
1611 }
1712}
You can’t perform that action at this time.
0 commit comments