Skip to content

Commit

Permalink
Rollup merge of rust-lang#70964 - RalfJung:mark-cli-lint-hack, r=petr…
Browse files Browse the repository at this point in the history
…ochenkov

rustc_session CLI lint parsing: mark a temporary hack as such

This code was added in rust-lang#70918, but it should not be necessary any more once `forbid` works as expected for in-code attributes.

Cc @tobithiel @davidtwco
  • Loading branch information
Centril authored Apr 10, 2020
2 parents 54807ca + 1761a65 commit 490bdc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,9 @@ pub fn get_cmd_lint_options(
for &level in &[lint::Allow, lint::Warn, lint::Deny, lint::Forbid] {
for (passed_arg_pos, lint_name) in matches.opt_strs_pos(level.as_str()) {
let arg_pos = if let lint::Forbid = level {
// forbid is always specified last, so it can't be overridden
// HACK: forbid is always specified last, so it can't be overridden.
// FIXME: remove this once <https://github.com/rust-lang/rust/issues/70819> is
// fixed and `forbid` works as expected.
usize::max_value()
} else {
passed_arg_pos
Expand Down

0 comments on commit 490bdc0

Please sign in to comment.