We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7e0c82 commit 5b541efCopy full SHA for 5b541ef
compiler/rustc_mir_transform/src/gvn.rs
@@ -1716,6 +1716,11 @@ impl<'tcx> VnState<'_, '_, 'tcx> {
1716
let place =
1717
Place { local, projection: self.tcx.mk_place_elems(projection.as_slice()) };
1718
return Some(place);
1719
+ } else if projection.last() == Some(&PlaceElem::Deref) {
1720
+ // `Deref` can only be the first projection in a place.
1721
+ // If we are here, we failed to find a local, and we already have a `Deref`.
1722
+ // Trying to add projections will only result in an ill-formed place.
1723
+ return None;
1724
} else if let Value::Projection(pointer, proj) = self.get(index)
1725
&& (allow_complex_projection || proj.is_stable_offset())
1726
&& let Some(proj) = self.try_as_place_elem(self.ty(index), proj, loc)
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments