Skip to content

Commit 6e8042b

Browse files
committed
use --cap-lints only when deny and forbid rules are not specified
Signed-off-by: onur-ozkan <[email protected]>
1 parent 7745deb commit 6e8042b

File tree

1 file changed

+4
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+4
-1
lines changed

src/bootstrap/src/core/build_steps/check.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ fn args(builder: &Builder<'_>) -> Vec<String> {
6565

6666
let all_args = std::env::args().collect::<Vec<_>>();
6767

68-
args.extend(strings(&["--", "--cap-lints", "warn"]));
68+
if deny.is_empty() && forbid.is_empty() {
69+
args.extend(strings(&["--", "--cap-lints", "warn"]));
70+
}
71+
6972
args.extend(get_clippy_rules_in_order(&all_args, allow, deny, warn, forbid));
7073
args.extend(ignored_lints.iter().map(|lint| format!("-Aclippy::{}", lint)));
7174
args.extend(builder.config.free_args.clone());

0 commit comments

Comments
 (0)