Skip to content

Commit

Permalink
[DO NOT MERGE] no cap fr fr
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Markeffsky committed Dec 23, 2022
1 parent ea8c6b2 commit 0b6e080
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1467,11 +1467,15 @@ pub fn get_cmd_lint_options(
.map(|(_, lint_name, level)| (lint_name, level))
.collect();

let lint_cap = matches.opt_str("cap-lints").map(|cap| {
let mut lint_cap = matches.opt_str("cap-lints").map(|cap| {
lint::Level::from_str(&cap)
.unwrap_or_else(|| early_error(error_format, &format!("unknown lint level: `{cap}`")))
});

if let Some(lint::Allow) = lint_cap {
lint_cap = Some(lint::Warn);
}

(lint_opts, describe_lints, lint_cap)
}

Expand Down

0 comments on commit 0b6e080

Please sign in to comment.