pub enum Severity {
Error,
Warning,
Info,
Hint,
}Expand description
How seriously a diagnostic should be treated by a consumer (CLI renderer, LSP client, editor diagnostics panel).
Until issue #1674, no DiagnosticCode’s default severity
(DiagnosticCode::severity) was ever Info or Hint — the two
advisory tiers existed only so a project’s [lints] table
(brink-project-config’s LintLevel::Info/LintLevel::Hint, resolved
through brink_analyzer::effective_severity) could opt a Warning-default
code down to one when a squiggle is too loud (issue #1162). Moving any
existing code’s default into one of these tiers is a separate decision,
deliberately not made by the issue that introduced the tiers.
DiagnosticCode::E157 (issue #1674) is the first code to default here
directly — RULED “off or info by default” for a narrow, precision-tuned
lint that must not nag a single-shot project.
Variants§
Error
Blocks compilation / is surfaced as a hard failure.
Warning
Non-fatal; the default tier for advisory diagnostics until a
[lints] override says otherwise.
Info
Advisory, LSP DiagnosticSeverity::INFORMATION — worth telling the
author about, but not something they need to act on.
Hint
Advisory and quiet, LSP DiagnosticSeverity::HINT — the tier IDEs use
for things like unused-symbol dimming, where even an info-level
squiggle is too loud.
Trait Implementations§
impl Copy for Severity
impl Eq for Severity
impl StructuralPartialEq for Severity
Auto Trait Implementations§
impl Freeze for Severity
impl RefUnwindSafe for Severity
impl Send for Severity
impl Sync for Severity
impl Unpin for Severity
impl UnsafeUnpin for Severity
impl UnwindSafe for Severity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.