diff options
| author | bors <bors@rust-lang.org> | 2021-06-14 17:21:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-14 17:21:28 +0000 |
| commit | 304441960e7058fe97f09ef00b20739b4dc56d11 (patch) | |
| tree | 2a8009738c6191dd38545b7511610b2ac3ea34f5 /compiler/rustc_session | |
| parent | a216131c3566858b78f45ccc0c36b5578f5c5155 (diff) | |
| parent | 7905473021ee75338381d94d51a829c568ad4ae8 (diff) | |
| download | rust-304441960e7058fe97f09ef00b20739b4dc56d11.tar.gz rust-304441960e7058fe97f09ef00b20739b4dc56d11.zip | |
Auto merge of #86117 - ehuss:force-warns-underscore, r=rylev
Fix force-warns to allow dashes. The `--force-warns` flag was not allowing lint names with dashes, only supporting underscores. This changes it to allow dashes to match the behavior of the A/W/D/F flags.
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 2b547f8be92..e197c43b301 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -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) } |
