about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/transform
diff options
context:
space:
mode:
authorJubilee <46493976+workingjubilee@users.noreply.github.com>2023-12-14 16:07:48 -0800
committerGitHub <noreply@github.com>2023-12-14 16:07:48 -0800
commit9e872b7cd8cd28314b9426e13ac586dad6fc9c2e (patch)
tree33b238d5fc9b8970f6a89273089982dd0bd7ce56 /compiler/rustc_const_eval/src/transform
parent576a74b8c9dc72704309db8fc12a2f1ca1cd7c59 (diff)
parent9a7841251115c79fe7e1c12e2e5d637e19ad940a (diff)
downloadrust-9e872b7cd8cd28314b9426e13ac586dad6fc9c2e.tar.gz
rust-9e872b7cd8cd28314b9426e13ac586dad6fc9c2e.zip
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 'compiler/rustc_const_eval/src/transform')
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/check.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index 5380d3071d6..bb17602d3ba 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -277,8 +277,8 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
         // "secondary" errors if they occurred.
         let secondary_errors = mem::take(&mut self.secondary_errors);
         if self.error_emitted.is_none() {
-            for mut error in secondary_errors {
-                self.tcx.sess.diagnostic().emit_diagnostic(&mut error);
+            for error in secondary_errors {
+                self.tcx.sess.diagnostic().emit_diagnostic(error);
             }
         } else {
             assert!(self.tcx.sess.has_errors().is_some());