Skip to content

Commit 6516832

Browse files
committed
Partially revert "Do not unify dereferences in GVN."
This reverts commit 917dd82.
1 parent 4caf105 commit 6516832

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
@@ -634,9 +634,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
634634
let proj = match proj {
635635
ProjectionElem::Deref => {
636636
let ty = place.ty(self.local_decls, self.tcx).ty;
637-
// unsound: https://github.com/rust-lang/rust/issues/130853
638-
if self.tcx.sess.opts.unstable_opts.unsound_mir_opts
639-
&& let Some(Mutability::Not) = ty.ref_mutability()
637+
if let Some(Mutability::Not) = ty.ref_mutability()
640638
&& let Some(pointee_ty) = ty.builtin_deref(true)
641639
&& pointee_ty.is_freeze(self.tcx, self.typing_env())
642640
{

0 commit comments

Comments
 (0)