File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ fn main() {
32
32
let args = env:: args_os ( ) . skip ( 1 ) . collect :: < Vec < _ > > ( ) ;
33
33
let arg = |name| args. windows ( 2 ) . find ( |args| args[ 0 ] == name) . and_then ( |args| args[ 1 ] . to_str ( ) ) ;
34
34
35
+ // We don't use the stage in this shim, but let's parse it to make sure that we're invoked
36
+ // by bootstrap, or that we provide a helpful error message if not.
37
+ bin_helpers:: parse_rustc_stage ( ) ;
35
38
let verbose = bin_helpers:: parse_rustc_verbose ( ) ;
36
39
37
40
// Detect whether or not we're a build script depending on whether --target
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ pub(crate) fn parse_rustc_verbose() -> usize {
18
18
/// Parses the value of the "RUSTC_STAGE" environment variable and returns it as a `String`.
19
19
///
20
20
/// If "RUSTC_STAGE" was not set, the program will be terminated with 101.
21
- #[ allow( unused) ]
22
21
pub ( crate ) fn parse_rustc_stage ( ) -> String {
23
22
std:: env:: var ( "RUSTC_STAGE" ) . unwrap_or_else ( |_| {
24
23
// Don't panic here; it's reasonable to try and run these shims directly. Give a helpful error instead.
You can’t perform that action at this time.
0 commit comments