Skip to content

Commit d89b4a7

Browse files
inquisitivecrystalMark-Simulacrum
authored andcommitted
Tidy up lint command line flags
1 parent 47ab5f7 commit d89b4a7

File tree

2 files changed

+10
-23
lines changed

2 files changed

+10
-23
lines changed

compiler/rustc_session/src/config.rs

+5-11
Original file line numberDiff line numberDiff line change
@@ -1089,10 +1089,11 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
10891089
),
10901090
opt::flag_s("", "test", "Build a test harness"),
10911091
opt::opt_s("", "target", "Target triple for which the code is compiled", "TARGET"),
1092-
opt::multi_s("W", "warn", "Set lint warnings", "OPT"),
1093-
opt::multi_s("A", "allow", "Set lint allowed", "OPT"),
1094-
opt::multi_s("D", "deny", "Set lint denied", "OPT"),
1095-
opt::multi_s("F", "forbid", "Set lint forbidden", "OPT"),
1092+
opt::multi_s("A", "allow", "Set lint allowed", "LINT"),
1093+
opt::multi_s("W", "warn", "Set lint warnings", "LINT"),
1094+
opt::multi_s("", "force-warn", "Set lint force-warn", "LINT"),
1095+
opt::multi_s("D", "deny", "Set lint denied", "LINT"),
1096+
opt::multi_s("F", "forbid", "Set lint forbidden", "LINT"),
10961097
opt::multi_s(
10971098
"",
10981099
"cap-lints",
@@ -1101,13 +1102,6 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
11011102
level",
11021103
"LEVEL",
11031104
),
1104-
opt::multi_s(
1105-
"",
1106-
"force-warn",
1107-
"Specifiy lints that should warn even if \
1108-
they are allowed somewhere else",
1109-
"LINT",
1110-
),
11111105
opt::multi_s("C", "codegen", "Set a codegen option", "OPT[=VALUE]"),
11121106
opt::flag_s("V", "version", "Print version info and exit"),
11131107
opt::flag_s("v", "verbose", "Use verbose output"),

src/librustdoc/lib.rs

+5-12
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,11 @@ fn opts() -> Vec<RustcOptGroup> {
503503
unstable("disable-minification", |o| {
504504
o.optflagmulti("", "disable-minification", "Disable minification applied on JS files")
505505
}),
506-
stable("warn", |o| o.optmulti("W", "warn", "Set lint warnings", "OPT")),
507-
stable("allow", |o| o.optmulti("A", "allow", "Set lint allowed", "OPT")),
508-
stable("deny", |o| o.optmulti("D", "deny", "Set lint denied", "OPT")),
509-
stable("forbid", |o| o.optmulti("F", "forbid", "Set lint forbidden", "OPT")),
506+
stable("allow", |o| o.optmulti("A", "allow", "Set lint allowed", "LINT")),
507+
stable("warn", |o| o.optmulti("W", "warn", "Set lint warnings", "LINT")),
508+
unstable("force-warn", |o| o.optmulti("", "force-warn", "Set lint force-warn", "LINT")),
509+
stable("deny", |o| o.optmulti("D", "deny", "Set lint denied", "LINT")),
510+
stable("forbid", |o| o.optmulti("F", "forbid", "Set lint forbidden", "LINT")),
510511
stable("cap-lints", |o| {
511512
o.optmulti(
512513
"",
@@ -517,14 +518,6 @@ fn opts() -> Vec<RustcOptGroup> {
517518
"LEVEL",
518519
)
519520
}),
520-
unstable("force-warn", |o| {
521-
o.optopt(
522-
"",
523-
"force-warn",
524-
"Lints that will warn even if allowed somewhere else",
525-
"LINTS",
526-
)
527-
}),
528521
unstable("index-page", |o| {
529522
o.optopt("", "index-page", "Markdown file to be used as index page", "PATH")
530523
}),

0 commit comments

Comments
 (0)