Skip to content

Commit 9e19369

Browse files
committed
Remove is_lint field from Level::Error.
Because it's redundant w.r.t. `Diagnostic::is_lint`, which is present for every diagnostic level. `struct_lint_level_impl` was the only place that set the `Error` field to `true`, and it's also the only place that calls `Diagnostic::is_lint()` to set the `is_lint` field.
1 parent afa80f3 commit 9e19369

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ pub fn report_msg<'tcx>(
454454
let span = stacktrace.first().map_or(DUMMY_SP, |fi| fi.span);
455455
let sess = machine.tcx.sess;
456456
let level = match diag_level {
457-
DiagLevel::Error => Level::Error { lint: false },
457+
DiagLevel::Error => Level::Error,
458458
DiagLevel::Warning => Level::Warning(None),
459459
DiagLevel::Note => Level::Note,
460460
};

0 commit comments

Comments
 (0)