diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-04 11:44:37 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-04 16:09:31 +1100 |
| commit | 8388112970288c79ddb217949070cfb04c2798a5 (patch) | |
| tree | 6b1151f8c5177ea8ec0855d21101d6201f828081 /compiler/rustc_middle/src/lint.rs | |
| parent | 8e6bca63f943a061264aec986446fac67c59c262 (diff) | |
| download | rust-8388112970288c79ddb217949070cfb04c2798a5.tar.gz rust-8388112970288c79ddb217949070cfb04c2798a5.zip | |
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.
Diffstat (limited to 'compiler/rustc_middle/src/lint.rs')
| -rw-r--r-- | compiler/rustc_middle/src/lint.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index ea1439c959d..d45ec8e4646 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -314,7 +314,7 @@ pub fn struct_lint_level( } Level::ForceWarn(Some(expect_id)) => rustc_errors::Level::Warning(Some(expect_id)), Level::Warn | Level::ForceWarn(None) => rustc_errors::Level::Warning(None), - Level::Deny | Level::Forbid => rustc_errors::Level::Error { lint: true }, + Level::Deny | Level::Forbid => rustc_errors::Level::Error, }; let mut err = DiagnosticBuilder::new(sess.dcx(), err_level, ""); if let Some(span) = span { |
