Skip to content

Commit aee2c30

Browse files
inquisitivecrystalMark-Simulacrum
authored andcommitted
Stabilize force-warn
1 parent d89b4a7 commit aee2c30

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

compiler/rustc_session/src/config.rs

+1-11
Original file line numberDiff line numberDiff line change
@@ -1157,19 +1157,10 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
11571157
pub fn get_cmd_lint_options(
11581158
matches: &getopts::Matches,
11591159
error_format: ErrorOutputType,
1160-
debugging_opts: &DebuggingOptions,
11611160
) -> (Vec<(String, lint::Level)>, bool, Option<lint::Level>) {
11621161
let mut lint_opts_with_position = vec![];
11631162
let mut describe_lints = false;
11641163

1165-
if !debugging_opts.unstable_options && matches.opt_present("force-warn") {
1166-
early_error(
1167-
error_format,
1168-
"the `-Z unstable-options` flag must also be passed to enable \
1169-
the flag `--force-warn=lints`",
1170-
);
1171-
}
1172-
11731164
for level in [lint::Allow, lint::Warn, lint::ForceWarn, lint::Deny, lint::Forbid] {
11741165
for (arg_pos, lint_name) in matches.opt_strs_pos(level.as_str()) {
11751166
if lint_name == "help" {
@@ -1959,8 +1950,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
19591950
.unwrap_or_else(|e| early_error(error_format, &e[..]));
19601951

19611952
let mut debugging_opts = DebuggingOptions::build(matches, error_format);
1962-
let (lint_opts, describe_lints, lint_cap) =
1963-
get_cmd_lint_options(matches, error_format, &debugging_opts);
1953+
let (lint_opts, describe_lints, lint_cap) = get_cmd_lint_options(matches, error_format);
19641954

19651955
check_debug_option_stability(&debugging_opts, error_format, json_rendered);
19661956

src/librustdoc/config.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,7 @@ impl Options {
671671
return Err(1);
672672
}
673673

674-
let (lint_opts, describe_lints, lint_cap) =
675-
get_cmd_lint_options(matches, error_format, &debugging_opts);
674+
let (lint_opts, describe_lints, lint_cap) = get_cmd_lint_options(matches, error_format);
676675

677676
Ok(Options {
678677
input,

src/librustdoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ fn opts() -> Vec<RustcOptGroup> {
505505
}),
506506
stable("allow", |o| o.optmulti("A", "allow", "Set lint allowed", "LINT")),
507507
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")),
508+
stable("force-warn", |o| o.optmulti("", "force-warn", "Set lint force-warn", "LINT")),
509509
stable("deny", |o| o.optmulti("D", "deny", "Set lint denied", "LINT")),
510510
stable("forbid", |o| o.optmulti("F", "forbid", "Set lint forbidden", "LINT")),
511511
stable("cap-lints", |o| {

0 commit comments

Comments
 (0)