Skip to content

Commit fefb0db

Browse files
committed
Partially revert "Do not unify dereferences in GVN."
This reverts commit 917dd82.
1 parent 7e0463f commit fefb0db

File tree

1 file changed

+1
-3
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+1
-3
lines changed

compiler/rustc_mir_transform/src/gvn.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,9 +642,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
642642
let proj = match proj {
643643
ProjectionElem::Deref => {
644644
let ty = place.ty(self.local_decls, self.tcx).ty;
645-
// unsound: https://github.com/rust-lang/rust/issues/130853
646-
if self.tcx.sess.opts.unstable_opts.unsound_mir_opts
647-
&& let Some(Mutability::Not) = ty.ref_mutability()
645+
if let Some(Mutability::Not) = ty.ref_mutability()
648646
&& let Some(pointee_ty) = ty.builtin_deref(true)
649647
&& pointee_ty.is_freeze(self.tcx, self.typing_env())
650648
{

0 commit comments

Comments
 (0)