File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
demo/rustc_driver/src/bin Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3,20 +3,20 @@ use std::{env::var, process::Command};
3
3
fn main ( ) {
4
4
// Search cargo-safe-tool and safe-tool CLI through environment variables,
5
5
// or just use the name if absent.
6
- let cargo_safe_tool = & * var ( "CARGO_SATE_TOOL " ) . unwrap_or_else ( |_| "cargo-safe-tool" . to_owned ( ) ) ;
6
+ let cargo_safe_tool = & * var ( "CARGO_SAFE_TOOL " ) . unwrap_or_else ( |_| "cargo-safe-tool" . to_owned ( ) ) ;
7
7
let safe_tool = & * var ( "SAFE_TOOL" ) . unwrap_or_else ( |_| "safe-tool" . to_owned ( ) ) ;
8
8
9
- let mut args = std:: env:: args ( ) . collect :: < Vec < _ > > ( ) ;
9
+ let args = std:: env:: args ( ) . collect :: < Vec < _ > > ( ) ;
10
10
11
11
if args. len ( ) == 2 && args[ 1 ] . as_str ( ) == "-vV" {
12
12
// cargo invokes `rustc -vV` first
13
13
run ( "rustc" , & [ "-vV" . to_owned ( ) ] , & [ ] ) ;
14
14
} else if std:: env:: var ( "WRAPPER" ) . as_deref ( ) == Ok ( "1" ) {
15
15
// then cargo invokes `rustc - --crate-name ___ --print=file-names`
16
- if args[ 1 ] == "-" {
17
- // `rustc -` is a substitute file name from stdin
18
- args[ 1 ] = "src/lib .rs" . to_owned ( ) ;
19
- }
16
+ // if args[1] == "-" {
17
+ // // `rustc -` is a substitute file name from stdin
18
+ // args[1] = "src/main .rs".to_owned();
19
+ // }
20
20
21
21
run ( safe_tool, & args[ 1 ..] , & [ ] ) ;
22
22
} else {
You can’t perform that action at this time.
0 commit comments