diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2023-12-14 16:07:48 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-14 16:07:48 -0800 |
| commit | 9e872b7cd8cd28314b9426e13ac586dad6fc9c2e (patch) | |
| tree | 33b238d5fc9b8970f6a89273089982dd0bd7ce56 /src/tools | |
| parent | 576a74b8c9dc72704309db8fc12a2f1ca1cd7c59 (diff) | |
| parent | 9a7841251115c79fe7e1c12e2e5d637e19ad940a (diff) | |
Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors
Cleanup errors handlers even more A sequel to #118587. r? `@compiler-errors`
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/miri/src/diagnostics.rs | 2 | ||||
| -rw-r--r-- | src/tools/rustfmt/src/parse/session.rs | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index ef394b16310..e0f59144975 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -512,7 +512,7 @@ pub fn report_msg<'tcx>( } } - handler.emit_diagnostic(&mut err); + handler.emit_diagnostic(err); } impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> { diff --git a/src/tools/rustfmt/src/parse/session.rs b/src/tools/rustfmt/src/parse/session.rs index 0573df9de2f..06f9c4c6243 100644 --- a/src/tools/rustfmt/src/parse/session.rs +++ b/src/tools/rustfmt/src/parse/session.rs @@ -284,10 +284,8 @@ impl ParseSess { // Methods that should be restricted within the parse module. impl ParseSess { pub(super) fn emit_diagnostics(&self, diagnostics: Vec<Diagnostic>) { - 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); } } |
