@@ -2618,14 +2618,14 @@ where
2618
2618
// Use conservative pointer kind if not optimizing. This saves us the
2619
2619
// Freeze/Unpin queries, and can save time in the codegen backend (noalias
2620
2620
// attributes in LLVM have compile-time cost even in unoptimized builds).
2621
- PointerKind :: Shared
2621
+ PointerKind :: SharedMutable
2622
2622
} else {
2623
2623
match mt {
2624
2624
hir:: Mutability :: Not => {
2625
2625
if ty. is_freeze ( tcx. at ( DUMMY_SP ) , cx. param_env ( ) ) {
2626
2626
PointerKind :: Frozen
2627
2627
} else {
2628
- PointerKind :: Shared
2628
+ PointerKind :: SharedMutable
2629
2629
}
2630
2630
}
2631
2631
hir:: Mutability :: Mut => {
@@ -2636,7 +2636,7 @@ where
2636
2636
if ty. is_unpin ( tcx. at ( DUMMY_SP ) , cx. param_env ( ) ) {
2637
2637
PointerKind :: UniqueBorrowed
2638
2638
} else {
2639
- PointerKind :: Shared
2639
+ PointerKind :: SharedMutable
2640
2640
}
2641
2641
}
2642
2642
}
@@ -3285,7 +3285,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
3285
3285
// or not to actually emit the attribute. It can also be controlled with the
3286
3286
// `-Zmutable-noalias` debugging option.
3287
3287
let no_alias = match kind {
3288
- PointerKind :: Shared | PointerKind :: UniqueBorrowed => false ,
3288
+ PointerKind :: SharedMutable | PointerKind :: UniqueBorrowed => false ,
3289
3289
PointerKind :: UniqueOwned => noalias_for_box,
3290
3290
PointerKind :: Frozen => !is_return,
3291
3291
} ;
0 commit comments