Skip to content

Commit

Permalink
allow disabling also for const refs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuseZ4 committed Nov 9, 2024
1 parent 28a08d7 commit 1a104ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_ty_utils/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ fn adjust_for_rust_scalar<'tcx>(
//
// `&mut T` and `Box<T>` where `T: Unpin` are unique and hence `noalias`.
let no_alias = match kind {
PointerKind::SharedRef { frozen } => frozen,
PointerKind::SharedRef { frozen } => frozen && noalias_mut_ref,
PointerKind::MutableRef { unpin } => unpin && noalias_mut_ref,
PointerKind::Box { unpin, global } => unpin && global && noalias_for_box,
};
Expand Down

0 comments on commit 1a104ff

Please sign in to comment.