Skip to content

Commit db97f09

Browse files
committed
[DO NOT MERGE] Enable lint capping by default for benchmarking
1 parent ec1de91 commit db97f09

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

compiler/rustc_session/src/config.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ impl Default for Options {
10151015
optimize: OptLevel::No,
10161016
debuginfo: DebugInfo::None,
10171017
lint_opts: Vec::new(),
1018-
lint_cap: None,
1018+
lint_cap: Some(lint::Allow),
10191019
describe_lints: false,
10201020
output_types: OutputTypes(BTreeMap::new()),
10211021
search_paths: vec![],
@@ -1787,7 +1787,7 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
17871787
}
17881788

17891789
pub fn get_cmd_lint_options(
1790-
handler: &EarlyErrorHandler,
1790+
_handler: &EarlyErrorHandler,
17911791
matches: &getopts::Matches,
17921792
) -> (Vec<(String, lint::Level)>, bool, Option<lint::Level>) {
17931793
let mut lint_opts_with_position = vec![];
@@ -1810,10 +1810,7 @@ pub fn get_cmd_lint_options(
18101810
.map(|(_, lint_name, level)| (lint_name, level))
18111811
.collect();
18121812

1813-
let lint_cap = matches.opt_str("cap-lints").map(|cap| {
1814-
lint::Level::from_str(&cap)
1815-
.unwrap_or_else(|| handler.early_error(format!("unknown lint level: `{cap}`")))
1816-
});
1813+
let lint_cap = Some(lint::Allow);
18171814

18181815
(lint_opts, describe_lints, lint_cap)
18191816
}

0 commit comments

Comments
 (0)