diff options
| author | inquisitivecrystal <22333129+inquisitivecrystal@users.noreply.github.com> | 2021-07-24 00:05:24 -0700 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-08-24 11:19:55 -0400 |
| commit | aee2c30f697797b4dabf92517e797f6f986b2312 (patch) | |
| tree | ac8ab4b5e7e066f4e36e7f1966295a18d6e42b88 /compiler/rustc_session/src | |
| parent | d89b4a705c0de7a8239b7b750950dfa511c2ff81 (diff) | |
| download | rust-aee2c30f697797b4dabf92517e797f6f986b2312.tar.gz rust-aee2c30f697797b4dabf92517e797f6f986b2312.zip | |
Stabilize `force-warn`
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index ca4ae238ae5..fdedb7e6a4a 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1157,19 +1157,10 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> { pub fn get_cmd_lint_options( matches: &getopts::Matches, error_format: ErrorOutputType, - debugging_opts: &DebuggingOptions, ) -> (Vec<(String, lint::Level)>, bool, Option<lint::Level>) { let mut lint_opts_with_position = vec![]; let mut describe_lints = false; - if !debugging_opts.unstable_options && matches.opt_present("force-warn") { - early_error( - error_format, - "the `-Z unstable-options` flag must also be passed to enable \ - the flag `--force-warn=lints`", - ); - } - for level in [lint::Allow, lint::Warn, lint::ForceWarn, lint::Deny, lint::Forbid] { for (arg_pos, lint_name) in matches.opt_strs_pos(level.as_str()) { if lint_name == "help" { @@ -1959,8 +1950,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options { .unwrap_or_else(|e| early_error(error_format, &e[..])); let mut debugging_opts = DebuggingOptions::build(matches, error_format); - let (lint_opts, describe_lints, lint_cap) = - get_cmd_lint_options(matches, error_format, &debugging_opts); + let (lint_opts, describe_lints, lint_cap) = get_cmd_lint_options(matches, error_format); check_debug_option_stability(&debugging_opts, error_format, json_rendered); |
