diff --git a/compiler/rustc_codegen_gcc/src/builder.rs b/compiler/rustc_codegen_gcc/src/builder.rs index 1787415b72e6d..df1e64c75b963 100644 --- a/compiler/rustc_codegen_gcc/src/builder.rs +++ b/compiler/rustc_codegen_gcc/src/builder.rs @@ -500,11 +500,11 @@ impl<'gcc, 'tcx> BackendTypes for Builder<'_, 'gcc, 'tcx> { } fn set_rvalue_location<'a, 'gcc, 'tcx>( - bx: &mut Builder<'a, 'gcc, 'tcx>, + _bx: &mut Builder<'a, 'gcc, 'tcx>, rvalue: RValue<'gcc>, ) -> RValue<'gcc> { - if let Some(location) = bx.location { - #[cfg(feature = "master")] + #[cfg(feature = "master")] + if let Some(location) = _bx.location { rvalue.set_location(location); } rvalue diff --git a/src/bootstrap/src/core/build_steps/clippy.rs b/src/bootstrap/src/core/build_steps/clippy.rs index d8b74b43cfab8..085c2d952e304 100644 --- a/src/bootstrap/src/core/build_steps/clippy.rs +++ b/src/bootstrap/src/core/build_steps/clippy.rs @@ -379,15 +379,24 @@ impl Step for CodegenGcc { let stamp = BuildStamp::new(&builder.cargo_out(build_compiler, Mode::Codegen, target)) .with_prefix("rustc_codegen_gcc-check"); - run_cargo( + let args = lint_args(builder, &self.config, &[]); + run_cargo(builder, cargo, args.clone(), &stamp, vec![], true, false); + + // Same but we disable the features enabled by default. + let mut cargo = prepare_tool_cargo( builder, - cargo, - lint_args(builder, &self.config, &[]), - &stamp, - vec![], - true, - false, + build_compiler, + Mode::Codegen, + target, + Kind::Clippy, + "compiler/rustc_codegen_gcc", + SourceType::InTree, + &[], ); + self.build_compiler.configure_cargo(&mut cargo); + println!("Now running clippy on `rustc_codegen_gcc` with `--no-default-features`"); + cargo.arg("--no-default-features"); + run_cargo(builder, cargo, args, &stamp, vec![], true, false); } fn metadata(&self) -> Option {