Skip to content

Commit 4f89c51

Browse files
committed
Take &mut Diagnostic in emit_diagnostic.
Taking a Diagnostic by move would break the usual pattern `diag.label(..).emit()`.
1 parent cce0d50 commit 4f89c51

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/parse/session.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,10 @@ impl ParseSess {
225225
// Methods that should be restricted within the parse module.
226226
impl ParseSess {
227227
pub(super) fn emit_diagnostics(&self, diagnostics: Vec<Diagnostic>) {
228-
for diagnostic in diagnostics {
229-
self.parse_sess.span_diagnostic.emit_diagnostic(&diagnostic);
228+
for mut diagnostic in diagnostics {
229+
self.parse_sess
230+
.span_diagnostic
231+
.emit_diagnostic(&mut diagnostic);
230232
}
231233
}
232234

0 commit comments

Comments
 (0)