mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
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.
This commit is contained in:
commit
304441960e
@ -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)
|
(lint_opts, describe_lints, lint_cap, force_warns)
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// compile-flags: --force-warns rust_2018_idioms -Zunstable-options
|
// compile-flags: --force-warns rust-2018-idioms -Zunstable-options
|
||||||
// check-pass
|
// check-pass
|
||||||
|
|
||||||
#![allow(bare_trait_objects)]
|
#![allow(bare_trait_objects)]
|
||||||
|
Loading…
Reference in New Issue
Block a user