diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs index 4d13cf94d918..55180a82885b 100644 --- a/src/bootstrap/src/core/build_steps/check.rs +++ b/src/bootstrap/src/core/build_steps/check.rs @@ -61,10 +61,15 @@ fn args(builder: &Builder<'_>) -> Vec { } } - let all_args = std::env::args().collect::>(); + args.extend(strings(&["--"])); + + if deny.is_empty() && forbid.is_empty() { + args.extend(strings(&["--cap-lints", "warn"])); + } - args.extend(strings(&["--", "--cap-lints", "warn"])); + let all_args = std::env::args().collect::>(); args.extend(get_clippy_rules_in_order(&all_args, allow, deny, warn, forbid)); + args.extend(ignored_lints.iter().map(|lint| format!("-Aclippy::{}", lint))); args.extend(builder.config.free_args.clone()); args