pub struct DiagnosticsCollector { /* private fields */ }Expand description
Collects diagnostics across all compiler phases.
Implementations§
Source§impl DiagnosticsCollector
impl DiagnosticsCollector
pub fn new() -> Self
pub fn add(&mut self, diagnostic: Diagnostic)
pub fn error( &mut self, file: PathBuf, line: usize, column: usize, message: String, phase: Phase, )
pub fn warning( &mut self, file: PathBuf, line: usize, column: usize, message: String, phase: Phase, )
pub fn has_errors(&self) -> bool
pub fn has_errors_in_phase(&self, phase: Phase) -> bool
pub fn error_count(&self) -> usize
pub fn warning_count(&self) -> usize
pub fn diagnostics(&self) -> &[Diagnostic]
pub fn errors(&self) -> Vec<&Diagnostic>
pub fn print_all(&self)
pub fn clear(&mut self)
pub fn merge(&mut self, other: DiagnosticsCollector)
Trait Implementations§
Source§impl Clone for DiagnosticsCollector
impl Clone for DiagnosticsCollector
Source§fn clone(&self) -> DiagnosticsCollector
fn clone(&self) -> DiagnosticsCollector
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DiagnosticsCollector
impl Debug for DiagnosticsCollector
Auto Trait Implementations§
impl Freeze for DiagnosticsCollector
impl RefUnwindSafe for DiagnosticsCollector
impl Send for DiagnosticsCollector
impl Sync for DiagnosticsCollector
impl Unpin for DiagnosticsCollector
impl UnsafeUnpin for DiagnosticsCollector
impl UnwindSafe for DiagnosticsCollector
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