diff --git a/src/parse/session.rs b/src/parse/session.rs index 0573df9de2f..06f9c4c6243 100644 --- a/src/parse/session.rs +++ b/src/parse/session.rs @@ -284,10 +284,8 @@ pub(crate) fn get_original_snippet(&self, file_name: &FileName) -> Option) { - for mut diagnostic in diagnostics { - self.parse_sess - .span_diagnostic - .emit_diagnostic(&mut diagnostic); + for diagnostic in diagnostics { + self.parse_sess.span_diagnostic.emit_diagnostic(diagnostic); } }