Take &mut Diagnostic in emit_diagnostic.
Taking a Diagnostic by move would break the usual pattern `diag.label(..).emit()`.
This commit is contained in:
parent
4767ccec93
commit
056951d628
13 changed files with 43 additions and 41 deletions
|
@ -771,8 +771,8 @@ impl server::Diagnostic for Rustc<'_, '_> {
|
|||
) {
|
||||
diag.sub(level.to_internal(), msg, MultiSpan::from_spans(spans), None);
|
||||
}
|
||||
fn emit(&mut self, diag: Self::Diagnostic) {
|
||||
self.sess().span_diagnostic.emit_diagnostic(&diag);
|
||||
fn emit(&mut self, mut diag: Self::Diagnostic) {
|
||||
self.sess().span_diagnostic.emit_diagnostic(&mut diag);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue