1
Fork 0

Store a single copy of the error registry in DiagCtxt

And pass this to the individual emitters when necessary.
This commit is contained in:
bjorn3 2024-11-09 18:30:13 +00:00
parent ea6f5cbd2f
commit 030545d8c3
9 changed files with 67 additions and 46 deletions

View file

@ -1883,7 +1883,11 @@ impl Translate for SharedEmitter {
}
impl Emitter for SharedEmitter {
fn emit_diagnostic(&mut self, mut diag: rustc_errors::DiagInner) {
fn emit_diagnostic(
&mut self,
mut diag: rustc_errors::DiagInner,
_registry: &rustc_errors::registry::Registry,
) {
// Check that we aren't missing anything interesting when converting to
// the cut-down local `DiagInner`.
assert_eq!(diag.span, MultiSpan::new());