Skip to content

Commit

Permalink
Rollup merge of #99378 - RalfJung:box-early-return, r=oli-obk
Browse files Browse the repository at this point in the history
interpret/visitor: add missing early return

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

r? `@oli-obk`
  • Loading branch information
Dylan-DPC committed Jul 18, 2022
2 parents a4c47bd + e6be52b commit 54c6c97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_const_eval/src/interpret/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(());
}
_ => {},
};
Expand Down

0 comments on commit 54c6c97

Please sign in to comment.