Skip to content

Commit f124d7f

Browse files
authored
Rollup merge of #70964 - RalfJung:mark-cli-lint-hack, r=petrochenkov
rustc_session CLI lint parsing: mark a temporary hack as such This code was added in #70918, but it should not be necessary any more once `forbid` works as expected for in-code attributes. Cc @tobithiel @davidtwco
2 parents fbe3977 + 1761a65 commit f124d7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_session/config.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,9 @@ pub fn get_cmd_lint_options(
10191019
for &level in &[lint::Allow, lint::Warn, lint::Deny, lint::Forbid] {
10201020
for (passed_arg_pos, lint_name) in matches.opt_strs_pos(level.as_str()) {
10211021
let arg_pos = if let lint::Forbid = level {
1022-
// forbid is always specified last, so it can't be overridden
1022+
// HACK: forbid is always specified last, so it can't be overridden.
1023+
// FIXME: remove this once <https://github.com/rust-lang/rust/issues/70819> is
1024+
// fixed and `forbid` works as expected.
10231025
usize::max_value()
10241026
} else {
10251027
passed_arg_pos

0 commit comments

Comments
 (0)