@@ -131,7 +131,6 @@ impl Crate {
131
131
"--" ,
132
132
"cargo" ,
133
133
] ) ;
134
- cmd. env ( "CARGO_PROFILE_RELEASE_DEBUG" , "true" ) ;
135
134
} else {
136
135
cmd = Command :: new ( "cargo" ) ;
137
136
}
@@ -254,17 +253,21 @@ fn normalize_diag(
254
253
255
254
/// Builds clippy inside the repo to make sure we have a clippy executable we can use.
256
255
fn build_clippy ( release_build : bool ) -> String {
257
- let output = Command :: new ( "cargo" )
258
- . args ( [
259
- "run" ,
260
- "--bin=clippy-driver" ,
261
- if release_build { "-r" } else { "" } ,
262
- "--" ,
263
- "--version" ,
264
- ] )
265
- . stderr ( Stdio :: inherit ( ) )
266
- . output ( )
267
- . unwrap ( ) ;
256
+ let mut build_cmd = Command :: new ( "cargo" ) ;
257
+ build_cmd. args ( [
258
+ "run" ,
259
+ "--bin=clippy-driver" ,
260
+ if release_build { "-r" } else { "" } ,
261
+ "--" ,
262
+ "--version" ,
263
+ ] ) ;
264
+
265
+ if release_build {
266
+ build_cmd. env ( "CARGO_PROFILE_RELEASE_DEBUG" , "true" ) ;
267
+ }
268
+
269
+ let output = build_cmd. stderr ( Stdio :: inherit ( ) ) . output ( ) . unwrap ( ) ;
270
+
268
271
if !output. status . success ( ) {
269
272
eprintln ! ( "Error: Failed to compile Clippy!" ) ;
270
273
std:: process:: exit ( 1 ) ;
@@ -286,13 +289,6 @@ fn main() {
286
289
287
290
let config = LintcheckConfig :: new ( ) ;
288
291
289
- if config. perf && config. max_jobs != 1 {
290
- eprintln ! (
291
- "Lintcheck's --perf flag must be triggered only with 1 job,\n remove either the --jobs/-j flag or the --perf flag"
292
- ) ;
293
- return ;
294
- }
295
-
296
292
match config. subcommand {
297
293
Some ( Commands :: Diff { old, new, truncate } ) => json:: diff ( & old, & new, truncate) ,
298
294
Some ( Commands :: Popular { output, number } ) => popular_crates:: fetch ( output, number) . unwrap ( ) ,
0 commit comments