File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
tests/run-make/rustc-crates-on-stable Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 44use run_make_support:: { cargo, rustc_path, source_root} ;
55
66fn main ( ) {
7- // Use the stage0 beta cargo for the compilation (it shouldn't really matter which cargo we use)
7+ // NOTE: in the following cargo invocation, make sure that no unstable cargo flags are used! We
8+ // want to check that the listed compiler crates here can compile on the stable channel. We
9+ // can't really just "ask" a stage1 cargo to pretend that it is a stable cargo, because other
10+ // compiler crates are part of the same workspace, which necessarily requires that they can use
11+ // unstable features and experimental editions (like edition 2024).
812 cargo ( )
9- // Ensure `proc-macro2`'s nightly detection is disabled
13+ // Ensure `proc-macro2`'s nightly detection is disabled: its build script avoids using
14+ // nightly features when `RUSTC_STAGE` is set.
1015 . env ( "RUSTC_STAGE" , "0" )
1116 . env ( "RUSTC" , rustc_path ( ) )
12- // We want to disallow all nightly features to simulate a stable build
13- . env ( "RUSTFLAGS " , "-Zallow-features= " )
17+ // This forces the underlying rustc to think it is a stable rustc.
18+ . env ( "RUSTC_BOOTSTRAP " , "-1 " )
1419 . arg ( "build" )
1520 . arg ( "--manifest-path" )
1621 . arg ( source_root ( ) . join ( "Cargo.toml" ) )
You can’t perform that action at this time.
0 commit comments