diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-09-07 08:43:29 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-09-07 15:42:12 +0000 |
| commit | 419c4e1c4ffff2d293264ed788268b5f165b4328 (patch) | |
| tree | 19ddfd6006184b52182fb4f27b57c467fc148b43 /compiler | |
| parent | 3c7278846102bb829c9a789e91bc43f0ed612943 (diff) | |
Update miri submodule
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index f3676604bb0..0c346b02c41 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -1478,7 +1478,9 @@ impl<'tcx> Place<'tcx> { /// It's guaranteed to be in the first place pub fn has_deref(&self) -> bool { // To make sure this is not accidently used in wrong mir phase - debug_assert!(!self.projection[1..].contains(&PlaceElem::Deref)); + debug_assert!( + self.projection.is_empty() || !self.projection[1..].contains(&PlaceElem::Deref) + ); self.projection.first() == Some(&PlaceElem::Deref) } |
