@@ -2618,14 +2618,14 @@ where
26182618 // Use conservative pointer kind if not optimizing. This saves us the
26192619 // Freeze/Unpin queries, and can save time in the codegen backend (noalias
26202620 // attributes in LLVM have compile-time cost even in unoptimized builds).
2621- PointerKind :: Shared
2621+ PointerKind :: SharedMutable
26222622 } else {
26232623 match mt {
26242624 hir:: Mutability :: Not => {
26252625 if ty. is_freeze ( tcx. at ( DUMMY_SP ) , cx. param_env ( ) ) {
26262626 PointerKind :: Frozen
26272627 } else {
2628- PointerKind :: Shared
2628+ PointerKind :: SharedMutable
26292629 }
26302630 }
26312631 hir:: Mutability :: Mut => {
@@ -2636,7 +2636,7 @@ where
26362636 if ty. is_unpin ( tcx. at ( DUMMY_SP ) , cx. param_env ( ) ) {
26372637 PointerKind :: UniqueBorrowed
26382638 } else {
2639- PointerKind :: Shared
2639+ PointerKind :: SharedMutable
26402640 }
26412641 }
26422642 }
@@ -3285,7 +3285,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
32853285 // or not to actually emit the attribute. It can also be controlled with the
32863286 // `-Zmutable-noalias` debugging option.
32873287 let no_alias = match kind {
3288- PointerKind :: Shared | PointerKind :: UniqueBorrowed => false ,
3288+ PointerKind :: SharedMutable | PointerKind :: UniqueBorrowed => false ,
32893289 PointerKind :: UniqueOwned => noalias_for_box,
32903290 PointerKind :: Frozen => !is_return,
32913291 } ;
0 commit comments