1
Fork 0

Change type of box_noalias to bool

This commit is contained in:
Tomasz Miąsko 2023-01-06 00:00:00 +00:00
parent 78075e1e26
commit 72f8d6a659
3 changed files with 3 additions and 3 deletions

View file

@ -254,7 +254,7 @@ fn adjust_for_rust_scalar<'tcx>(
// The aliasing rules for `Box<T>` are still not decided, but currently we emit
// `noalias` for it. This can be turned off using an unstable flag.
// See https://github.com/rust-lang/unsafe-code-guidelines/issues/326
let noalias_for_box = cx.tcx.sess.opts.unstable_opts.box_noalias.unwrap_or(true);
let noalias_for_box = cx.tcx.sess.opts.unstable_opts.box_noalias;
// LLVM prior to version 12 had known miscompiles in the presence of noalias attributes
// (see #54878), so it was conditionally disabled, but we don't support earlier