Struct rustc_errors::LintDiagnosticBuilder
source · [−]pub struct LintDiagnosticBuilder<'a, G: EmissionGuarantee>(DiagnosticBuilder<'a, G>);
Expand description
Wrapper around a DiagnosticBuilder
for creating lints.
Tuple Fields
0: DiagnosticBuilder<'a, G>
Implementations
sourceimpl<'a, G: EmissionGuarantee> LintDiagnosticBuilder<'a, G>
impl<'a, G: EmissionGuarantee> LintDiagnosticBuilder<'a, G>
sourcepub fn build(self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'a, G>
pub fn build(self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'a, G>
Return the inner DiagnosticBuilder
, first setting the primary message to msg
.
sourcepub fn new(err: DiagnosticBuilder<'a, G>) -> LintDiagnosticBuilder<'a, G>
pub fn new(err: DiagnosticBuilder<'a, G>) -> LintDiagnosticBuilder<'a, G>
Create a LintDiagnosticBuilder
from some existing DiagnosticBuilder
.
sourceimpl<'a> LintDiagnosticBuilder<'a, ErrorGuaranteed>
impl<'a> LintDiagnosticBuilder<'a, ErrorGuaranteed>
pub fn forget_guarantee(self) -> LintDiagnosticBuilder<'a, ()>
Auto Trait Implementations
impl<'a, G> !RefUnwindSafe for LintDiagnosticBuilder<'a, G>
impl<'a, G> !Send for LintDiagnosticBuilder<'a, G>
impl<'a, G> !Sync for LintDiagnosticBuilder<'a, G>
impl<'a, G> Unpin for LintDiagnosticBuilder<'a, G>where
G: Unpin,
impl<'a, G> !UnwindSafe for LintDiagnosticBuilder<'a, G>
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: 16 bytes