Replace ParseSess::set_dcx with DiagCtxt::set_emitter
Replacing the error emitter doesn't accidentally clear the error count.
This commit is contained in:
parent
6556147d15
commit
6a566ee092
3 changed files with 8 additions and 8 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue