Struct rustc_session::EarlyErrorHandler
source · pub struct EarlyErrorHandler {
handler: Handler,
}
Expand description
A wrapper around an Handler
that is used for early error emissions.
Fields§
§handler: Handler
Implementations§
source§impl EarlyErrorHandler
impl EarlyErrorHandler
pub fn new(output: ErrorOutputType) -> Self
pub fn abort_if_errors(&self)
sourcepub fn abort_if_error_and_set_error_format(&mut self, output: ErrorOutputType)
pub fn abort_if_error_and_set_error_format(&mut self, output: ErrorOutputType)
Swap out the underlying handler once we acquire the user’s preference on error emission format. Any errors prior to that will cause an abort and all stashed diagnostics of the previous handler will be emitted.
pub fn early_note(&self, msg: impl Into<DiagnosticMessage>)
pub fn early_help(&self, msg: impl Into<DiagnosticMessage>)
pub fn early_error_no_abort( &self, msg: impl Into<DiagnosticMessage> ) -> ErrorGuaranteed
pub fn early_error(&self, msg: impl Into<DiagnosticMessage>) -> !
pub(crate) fn early_struct_error( &self, msg: impl Into<DiagnosticMessage> ) -> DiagnosticBuilder<'_, !>
pub fn early_warn(&self, msg: impl Into<DiagnosticMessage>)
Auto Trait Implementations§
impl !RefUnwindSafe for EarlyErrorHandler
impl !Send for EarlyErrorHandler
impl !Sync for EarlyErrorHandler
impl Unpin for EarlyErrorHandler
impl !UnwindSafe for EarlyErrorHandler
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
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: 416 bytes