pub enum Level {
Bug,
Fatal,
Error,
Warning,
Note,
OnceNote,
Help,
OnceHelp,
FailureNote,
Allow,
}
Expand description
Diag level.
Variants§
Bug
For bugs in the compiler. Manifests as an ICE (internal compiler error) panic.
Its EmissionGuarantee
is BugAbort
.
Fatal
An error that causes an immediate abort. Used for things like configuration errors, internal overflows, some file operation errors.
Its EmissionGuarantee
is FatalAbort
.
Error
An error in the code being compiled, which prevents compilation from finishing. This is the most common case.
Its EmissionGuarantee
is ErrorGuaranteed
.
Warning
A warning about the code being compiled. Does not prevent compilation from finishing.
Its EmissionGuarantee
is ()
.
Note
A message giving additional context. Rare, because notes are more commonly attached to other diagnostics such as errors.
Its EmissionGuarantee
is ()
.
OnceNote
A note that is only emitted once. Rare, mostly used in circumstances relating to lints.
Its EmissionGuarantee
is ()
.
Help
A message suggesting how to fix something. Rare, because help messages are more commonly attached to other diagnostics such as errors.
Its EmissionGuarantee
is ()
.
OnceHelp
A help that is only emitted once. Rare.
Its EmissionGuarantee
is ()
.
FailureNote
Similar to Note
, but used in cases where compilation has failed. Rare.
Its EmissionGuarantee
is ()
.
Allow
Only used for lints.
Its EmissionGuarantee
is ()
.
Implementations§
Trait Implementations§
Source§impl Ord for Level
impl Ord for Level
Source§impl PartialOrd for Level
impl PartialOrd for Level
impl Copy for Level
impl Eq for Level
impl StructuralPartialEq for Level
Auto Trait Implementations§
impl Freeze for Level
impl RefUnwindSafe for Level
impl Send for Level
impl Sync for Level
impl Unpin for Level
impl UnwindSafe for Level
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<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more