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
|
@ -1748,7 +1748,7 @@ impl SharedEmitterMain {
|
|||
if let Some(code) = diag.code {
|
||||
d.code(code);
|
||||
}
|
||||
handler.emit_diagnostic(&d);
|
||||
handler.emit_diagnostic(&mut d);
|
||||
}
|
||||
Ok(SharedEmitterMessage::InlineAsmError(cookie, msg, level, source)) => {
|
||||
let msg = msg.strip_prefix("error: ").unwrap_or(&msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue