diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-20 18:26:09 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-20 20:36:08 +0100 |
| commit | 4f89c51a5b3f27f38a7701d5243a80d7c1c44dff (patch) | |
| tree | f76e339eca55a798d2830bdbfd76f66eafe76af0 | |
| parent | cce0d50bcbf3b99726f93430f4ed9b6a250540a4 (diff) | |
| download | rust-4f89c51a5b3f27f38a7701d5243a80d7c1c44dff.tar.gz rust-4f89c51a5b3f27f38a7701d5243a80d7c1c44dff.zip | |
Take &mut Diagnostic in emit_diagnostic.
Taking a Diagnostic by move would break the usual pattern `diag.label(..).emit()`.
| -rw-r--r-- | src/parse/session.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parse/session.rs b/src/parse/session.rs index a34ceed3fc9..412f4434b9e 100644 --- a/src/parse/session.rs +++ b/src/parse/session.rs @@ -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); } } |
