Skip to content

Fix force-warns to allow dashes. #86117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,8 @@ pub fn get_cmd_lint_options(
);
}

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

(lint_opts, describe_lints, lint_cap, force_warns)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// compile-flags: --force-warns rust_2018_idioms -Zunstable-options
// compile-flags: --force-warns rust-2018-idioms -Zunstable-options
// check-pass

#![allow(bare_trait_objects)]
Expand Down