File tree 1 file changed +7
-4
lines changed
tests/run-make/rustc-crates-on-stable
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 4
4
use run_make_support:: { cargo, rustc_path, source_root} ;
5
5
6
6
fn main ( ) {
7
- // Use the stage0 beta cargo for the compilation (it shouldn't really matter which cargo we use)
7
+ // NOTE: in the follow cargo invocation, make sure that no unstable cargo flags are used! We
8
+ // want to check that these compiler crates can compile on the stable channel, which includes
9
+ // treating this cargo as if it was a stable cargo!
8
10
cargo ( )
9
- // Ensure `proc-macro2`'s nightly detection is disabled
11
+ // Ensure `proc-macro2`'s nightly detection is disabled. `proc-macro2` bails its nightly
12
+ // detection if it detects `RUSTC_STAGE` getting set.
10
13
. env ( "RUSTC_STAGE" , "0" )
11
14
. env ( "RUSTC" , rustc_path ( ) )
12
- // We want to disallow all nightly features to simulate a stable build
13
- . env ( "RUSTFLAGS " , "-Zallow-features= " )
15
+ // This forces the underlying rustc to think it is a stable rustc.
16
+ . env ( "RUSTC_BOOTSTRAP " , "-1 " )
14
17
. arg ( "build" )
15
18
. arg ( "--manifest-path" )
16
19
. arg ( source_root ( ) . join ( "Cargo.toml" ) )
You can’t perform that action at this time.
0 commit comments