about summary refs log tree commit diff
path: root/src/bootstrap/check.rs
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2023-04-22 17:47:31 +0100
committerclubby789 <jamie@hill-daniel.co.uk>2023-05-06 22:15:49 +0100
commit32e27cc60765ae21426b31073ba9ac2bda499c8d (patch)
tree1a860dea6096580ae7a2e9c4cf8b61bb0579211a /src/bootstrap/check.rs
parent74c4821045c68d42bb8b8a7c998bdb5c2a72bd0d (diff)
downloadrust-32e27cc60765ae21426b31073ba9ac2bda499c8d.tar.gz
rust-32e27cc60765ae21426b31073ba9ac2bda499c8d.zip
Migrate bootstrap to Clap-based arguments
Diffstat (limited to 'src/bootstrap/check.rs')
-rw-r--r--src/bootstrap/check.rs18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index 956b82385f6..b11be96cefe 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -20,15 +20,7 @@ fn args(builder: &Builder<'_>) -> Vec<String> {
         arr.iter().copied().map(String::from)
     }
 
-    if let Subcommand::Clippy {
-        fix,
-        clippy_lint_allow,
-        clippy_lint_deny,
-        clippy_lint_warn,
-        clippy_lint_forbid,
-        ..
-    } = &builder.config.cmd
-    {
+    if let Subcommand::Clippy { fix, allow, deny, warn, forbid, .. } = &builder.config.cmd {
         // disable the most spammy clippy lints
         let ignored_lints = vec![
             "many_single_char_names", // there are a lot in stdarch
@@ -53,10 +45,10 @@ fn args(builder: &Builder<'_>) -> Vec<String> {
         args.extend(strings(&["--", "--cap-lints", "warn"]));
         args.extend(ignored_lints.iter().map(|lint| format!("-Aclippy::{}", lint)));
         let mut clippy_lint_levels: Vec<String> = Vec::new();
-        clippy_lint_allow.iter().for_each(|v| clippy_lint_levels.push(format!("-A{}", v)));
-        clippy_lint_deny.iter().for_each(|v| clippy_lint_levels.push(format!("-D{}", v)));
-        clippy_lint_warn.iter().for_each(|v| clippy_lint_levels.push(format!("-W{}", v)));
-        clippy_lint_forbid.iter().for_each(|v| clippy_lint_levels.push(format!("-F{}", v)));
+        allow.iter().for_each(|v| clippy_lint_levels.push(format!("-A{}", v)));
+        deny.iter().for_each(|v| clippy_lint_levels.push(format!("-D{}", v)));
+        warn.iter().for_each(|v| clippy_lint_levels.push(format!("-W{}", v)));
+        forbid.iter().for_each(|v| clippy_lint_levels.push(format!("-F{}", v)));
         args.extend(clippy_lint_levels);
         args.extend(builder.config.free_args.clone());
         args