File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ fn main() {
3232    let  args = env:: args_os ( ) . skip ( 1 ) . collect :: < Vec < _ > > ( ) ; 
3333    let  arg = |name| args. windows ( 2 ) . find ( |args| args[ 0 ]  == name) . and_then ( |args| args[ 1 ] . to_str ( ) ) ; 
3434
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 ( ) ; 
3538    let  verbose = bin_helpers:: parse_rustc_verbose ( ) ; 
3639
3740    // 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 {
1818/// Parses the value of the "RUSTC_STAGE" environment variable and returns it as a `String`. 
1919/// 
2020/// If "RUSTC_STAGE" was not set, the program will be terminated with 101. 
21- #[ allow( unused) ]  
2221pub ( crate )  fn  parse_rustc_stage ( )  -> String  { 
2322    std:: env:: var ( "RUSTC_STAGE" ) . unwrap_or_else ( |_| { 
2423        // 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