@@ -131,7 +131,6 @@ impl Crate {
131131 "--" ,
132132 "cargo" ,
133133 ] ) ;
134- cmd. env ( "CARGO_PROFILE_RELEASE_DEBUG" , "true" ) ;
135134 } else {
136135 cmd = Command :: new ( "cargo" ) ;
137136 }
@@ -254,17 +253,21 @@ fn normalize_diag(
254253
255254/// Builds clippy inside the repo to make sure we have a clippy executable we can use.
256255fn 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+
268271 if !output. status . success ( ) {
269272 eprintln ! ( "Error: Failed to compile Clippy!" ) ;
270273 std:: process:: exit ( 1 ) ;
@@ -286,13 +289,6 @@ fn main() {
286289
287290 let config = LintcheckConfig :: new ( ) ;
288291
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-
296292 match config. subcommand {
297293 Some ( Commands :: Diff { old, new, truncate } ) => json:: diff ( & old, & new, truncate) ,
298294 Some ( Commands :: Popular { output, number } ) => popular_crates:: fetch ( output, number) . unwrap ( ) ,
0 commit comments