Auto merge of #33484 - murarth:diagnostic-builder-fields, r=brson
Add accessor methods to DiagnosticBuilder
This commit is contained in:
commit
0cc90978e8
@ -311,6 +311,14 @@ impl<'a> DiagnosticBuilder<'a> {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn message(&self) -> &str {
|
||||||
|
&self.message
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn level(&self) -> Level {
|
||||||
|
self.level
|
||||||
|
}
|
||||||
|
|
||||||
/// Convenience function for internal use, clients should use one of the
|
/// Convenience function for internal use, clients should use one of the
|
||||||
/// struct_* methods on Handler.
|
/// struct_* methods on Handler.
|
||||||
fn new(emitter: &'a RefCell<Box<Emitter>>,
|
fn new(emitter: &'a RefCell<Box<Emitter>>,
|
||||||
|
Loading…
Reference in New Issue
Block a user