Enum rustc_errors::Level
source · [−]pub enum Level {
Bug,
DelayedBug,
Fatal,
Error {
lint: bool,
},
Warning(Option<LintExpectationId>),
Note,
OnceNote,
Help,
FailureNote,
Allow,
Expect(LintExpectationId),
}
Variants
Bug
DelayedBug
Fatal
Error
Fields
lint: bool
If this error comes from a lint, don’t abort compilation even when abort_if_errors() is called.
Warning(Option<LintExpectationId>)
This LintExpectationId
is used for expected lint diagnostics, which should
also emit a warning due to the force-warn
flag. In all other cases this should
be None
.
Note
OnceNote
A note that is only emitted once.
Help
FailureNote
Allow
Expect(LintExpectationId)
Implementations
sourceimpl Level
impl Level
pub(crate) fn color(self) -> ColorSpec
pub fn to_str(self) -> &'static str
pub fn is_failure_note(&self) -> bool
pub fn get_expectation_id(&self) -> Option<LintExpectationId>
Trait Implementations
impl Copy for Level
impl Eq for Level
impl StructuralEq for Level
impl StructuralPartialEq for Level
Auto Trait Implementations
impl RefUnwindSafe for Level
impl Send for Level
impl Sync for Level
impl Unpin for Level
impl UnwindSafe for Level
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes
Size for each variant:
Bug
: 0 bytesDelayedBug
: 0 bytesFatal
: 0 bytesError
: 1 byteWarning
: 23 bytesNote
: 0 bytesOnceNote
: 0 bytesHelp
: 0 bytesFailureNote
: 0 bytesAllow
: 0 bytesExpect
: 23 bytes