mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
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
cce0d50bcb
commit
4f89c51a5b
@ -225,8 +225,10 @@ impl ParseSess {
|
||||
// Methods that should be restricted within the parse module.
|
||||
impl ParseSess {
|
||||
pub(super) fn emit_diagnostics(&self, diagnostics: Vec<Diagnostic>) {
|
||||
for diagnostic in diagnostics {
|
||||
self.parse_sess.span_diagnostic.emit_diagnostic(&diagnostic);
|
||||
for mut diagnostic in diagnostics {
|
||||
self.parse_sess
|
||||
.span_diagnostic
|
||||
.emit_diagnostic(&mut diagnostic);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user