diff options
| -rw-r--r-- | compiler/rustc_middle/src/ty/layout.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_target/src/abi/mod.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index ab76ad50984..3c27e36795e 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -2618,14 +2618,14 @@ where // Use conservative pointer kind if not optimizing. This saves us the // Freeze/Unpin queries, and can save time in the codegen backend (noalias // attributes in LLVM have compile-time cost even in unoptimized builds). - PointerKind::Shared + PointerKind::SharedMutable } else { match mt { hir::Mutability::Not => { if ty.is_freeze(tcx.at(DUMMY_SP), cx.param_env()) { PointerKind::Frozen } else { - PointerKind::Shared + PointerKind::SharedMutable } } hir::Mutability::Mut => { @@ -2636,7 +2636,7 @@ where if ty.is_unpin(tcx.at(DUMMY_SP), cx.param_env()) { PointerKind::UniqueBorrowed } else { - PointerKind::Shared + PointerKind::SharedMutable } } } @@ -3285,7 +3285,7 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> { // or not to actually emit the attribute. It can also be controlled with the // `-Zmutable-noalias` debugging option. let no_alias = match kind { - PointerKind::Shared | PointerKind::UniqueBorrowed => false, + PointerKind::SharedMutable | PointerKind::UniqueBorrowed => false, PointerKind::UniqueOwned => noalias_for_box, PointerKind::Frozen => !is_return, }; diff --git a/compiler/rustc_target/src/abi/mod.rs b/compiler/rustc_target/src/abi/mod.rs index 6f4d073d704..b8398daadf1 100644 --- a/compiler/rustc_target/src/abi/mod.rs +++ b/compiler/rustc_target/src/abi/mod.rs @@ -1350,7 +1350,7 @@ impl<'a, Ty> Deref for TyAndLayout<'a, Ty> { #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum PointerKind { /// Most general case, we know no restrictions to tell LLVM. - Shared, + SharedMutable, /// `&T` where `T` contains no `UnsafeCell`, is `noalias` and `readonly`. Frozen, |
