We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28a08d7 commit 1a104ffCopy full SHA for 1a104ff
compiler/rustc_ty_utils/src/abi.rs
@@ -432,7 +432,7 @@ fn adjust_for_rust_scalar<'tcx>(
432
//
433
// `&mut T` and `Box<T>` where `T: Unpin` are unique and hence `noalias`.
434
let no_alias = match kind {
435
- PointerKind::SharedRef { frozen } => frozen,
+ PointerKind::SharedRef { frozen } => frozen && noalias_mut_ref,
436
PointerKind::MutableRef { unpin } => unpin && noalias_mut_ref,
437
PointerKind::Box { unpin, global } => unpin && global && noalias_for_box,
438
};
0 commit comments