Replace ParseSess::set_dcx with DiagCtxt::set_emitter
Replacing the error emitter doesn't accidentally clear the error count.
This commit is contained in:
@@ -712,6 +712,10 @@ impl DiagCtxt {
|
||||
inner.emitter = new_emitter;
|
||||
}
|
||||
|
||||
pub fn set_emitter(&self, emitter: Box<dyn Emitter + DynSend>) {
|
||||
self.inner.borrow_mut().emitter = emitter;
|
||||
}
|
||||
|
||||
/// Translate `message` eagerly with `args` to `SubdiagMessage::Eager`.
|
||||
pub fn eagerly_translate<'a>(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user