about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-07-18 21:14:48 +0530
committerGitHub <noreply@github.com>2022-07-18 21:14:48 +0530
commita47a090d514dd6285d20067e02a058c733be3df0 (patch)
treeb581d87863e00ee2757b17cfea66489b59e3f2f5
parent60c1068c924d5dacaa2bebb4427cf5aaca9577e9 (diff)
parente6be52bbbde9043385ecc5a4e2460fa85daba9c9 (diff)
downloadrust-a47a090d514dd6285d20067e02a058c733be3df0.tar.gz
rust-a47a090d514dd6285d20067e02a058c733be3df0.zip
Rollup merge of #99378 - RalfJung:box-early-return, r=oli-obk
interpret/visitor: add missing early return

I forgot to add this when adding the special `Box` handling branch.

r? ```@oli-obk```
-rw-r--r--compiler/rustc_const_eval/src/interpret/visitor.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/visitor.rs b/compiler/rustc_const_eval/src/interpret/visitor.rs
index f6a0c19d259..3f6e8a8f755 100644
--- a/compiler/rustc_const_eval/src/interpret/visitor.rs
+++ b/compiler/rustc_const_eval/src/interpret/visitor.rs
@@ -473,6 +473,9 @@ macro_rules! make_value_visitor {
                         // The second `Box` field is the allocator, which we recursively check for validity
                         // like in regular structs.
                         self.visit_field(v, 1, &alloc)?;
+
+                        // We visited all parts of this one.
+                        return Ok(());
                     }
                     _ => {},
                 };