File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
collector/src/compile/execute Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ impl<'a> CargoProcess<'a> {
248248 } ;
249249
250250 if let Some ( c) = & self . toolchain . components . clippy {
251- cmd. env ( "CLIPPY" , & * FAKE_CLIPPY ) . env ( " CLIPPY_REAL", c) ;
251+ cmd. env ( "CLIPPY_REAL" , c) ;
252252 }
253253
254254 for config in & self . toolchain . components . cargo_configs {
@@ -330,11 +330,17 @@ impl<'a> CargoProcess<'a> {
330330 let mut cmd = self . base_command ( self . cwd , cargo_subcommand) ;
331331 cmd. arg ( "-p" ) . arg ( self . get_pkgid ( self . cwd ) ?) ;
332332 match self . profile {
333- Profile :: Check | Profile :: Clippy => {
333+ Profile :: Check => {
334334 cmd. arg ( "--profile" ) . arg ( "check" ) ;
335335 }
336336 Profile :: Debug => { }
337337 Profile :: Doc => { }
338+ Profile :: Clippy => {
339+ cmd. arg ( "--profile" ) . arg ( "check" ) ;
340+ // For Clippy, we still invoke `cargo rustc`, but we need to override the
341+ // executed rustc to be clippy-fake.
342+ cmd. env ( "RUSTC" , & * FAKE_CLIPPY ) ;
343+ }
338344 Profile :: Opt => {
339345 cmd. arg ( "--release" ) ;
340346 }
You can’t perform that action at this time.
0 commit comments