pub enum LintLevel {
Allow,
Warn,
Deny,
Info,
Hint,
}Expand description
A [lints] table entry’s severity (issue #1160) — mirrors Rust’s own
[lints] levels. Warn is every diagnostic code’s implicit level when
[lints] doesn’t mention it, so it doubles as this type’s Default.
Defined here for the same reason as Dialect/TypePolicy: a
project-policy type this crate parses but doesn’t interpret, kept
dependency-free (#1234) and re-exported by brink-analyzer, which owns
applying it against the real DiagnosticCode set.
Variants§
Allow
Never escalate this code past Warning, even under deny-warnings.
Warn
The code’s ordinary behavior: Warning, promoted to Error by
deny-warnings like any other unconfigured warning.
Deny
Always Error, regardless of deny-warnings.
Info
Down-level to Severity::Info (issue #1162) — an advisory tier below
Warning, immune to deny-warnings like Allow (escalating an
author’s deliberate downgrade back up would defeat the point of it).
Hint
Down-level to Severity::Hint (issue #1162) — the quietest tier,
immune to deny-warnings for the same reason as Info. The IDE-
convention use case this exists for (e.g. unused-symbol dimming) is
exactly the case where even an Info squiggle is too loud.
Trait Implementations§
impl Copy for LintLevel
Source§impl<'de> Deserialize<'de> for LintLevel
impl<'de> Deserialize<'de> for LintLevel
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LintLevel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LintLevel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for LintLevel
Source§impl Serialize for LintLevel
impl Serialize for LintLevel
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for LintLevel
Auto Trait Implementations§
impl Freeze for LintLevel
impl RefUnwindSafe for LintLevel
impl Send for LintLevel
impl Sync for LintLevel
impl Unpin for LintLevel
impl UnsafeUnpin for LintLevel
impl UnwindSafe for LintLevel
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.