rustc_const_eval: remove ref patterns (+some pattern matching imps)

This commit is contained in:
Maybe Waffle 2022-12-23 15:15:21 +00:00
parent 85357e3e2e
commit 3dca58e249
14 changed files with 125 additions and 139 deletions

View file

@ -419,7 +419,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
)
}
// Recursive checking
if let Some(ref mut ref_tracking) = self.ref_tracking {
if let Some(ref_tracking) = self.ref_tracking.as_deref_mut() {
// Proceed recursively even for ZST, no reason to skip them!
// `!` is a ZST and we want to validate it.
if let Ok((alloc_id, _offset, _prov)) = self.ecx.ptr_try_get_alloc_id(place.ptr) {