diff options
| author | bors <bors@rust-lang.org> | 2022-09-07 16:31:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-07 16:31:39 +0000 |
| commit | f91ca2878af792bc6969b97d78fe91b27739ac2d (patch) | |
| tree | aecf37059111317c32a10393e73bb60c900f141b /compiler/rustc_middle | |
| parent | a4d034126da8ff42590325622b1861c2597e870b (diff) | |
| parent | 419c4e1c4ffff2d293264ed788268b5f165b4328 (diff) | |
| download | rust-f91ca2878af792bc6969b97d78fe91b27739ac2d.tar.gz rust-f91ca2878af792bc6969b97d78fe91b27739ac2d.zip | |
Auto merge of #101522 - oli-obk:miriup, r=oli-obk
Update miri submodule fixes #101344 cc `@rust-lang/miri` r? `@ghost`
Diffstat (limited to 'compiler/rustc_middle')
| -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 80ef166d57f..753e1f4b9da 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -1464,7 +1464,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) } |
