Enum rustc_errors::Level
source · [−]pub enum Level {
Bug,
DelayedBug,
Fatal,
Error {
lint: bool,
},
Warning,
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
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. 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: 20 bytes
Size for each variant:
Bug
: 0 bytesDelayedBug
: 0 bytesFatal
: 0 bytesError
: 1 byteWarning
: 0 bytesNote
: 0 bytesOnceNote
: 0 bytesHelp
: 0 bytesFailureNote
: 0 bytesAllow
: 0 bytesExpect
: 19 bytes