Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7905473

Browse files
committedJun 10, 2021
Fix force-warns to allow dashes.
1 parent 40c1623 commit 7905473

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎compiler/rustc_session/src/config.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,8 @@ pub fn get_cmd_lint_options(
12071207
);
12081208
}
12091209

1210-
let force_warns = matches.opt_strs("force-warns");
1210+
let force_warns =
1211+
matches.opt_strs("force-warns").into_iter().map(|name| name.replace('-', "_")).collect();
12111212

12121213
(lint_opts, describe_lints, lint_cap, force_warns)
12131214
}

‎src/test/ui/lint/force-warn/force-warn-group-allow-warning.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-flags: --force-warns rust_2018_idioms -Zunstable-options
1+
// compile-flags: --force-warns rust-2018-idioms -Zunstable-options
22
// check-pass
33

44
#![allow(bare_trait_objects)]

0 commit comments

Comments
 (0)
Please sign in to comment.