mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
Change type of box_noalias to bool
This commit is contained in:
parent
78075e1e26
commit
72f8d6a659
@ -715,7 +715,7 @@ fn test_unstable_options_tracking_hash() {
|
||||
tracked!(asm_comments, true);
|
||||
tracked!(assume_incomplete_release, true);
|
||||
tracked!(binary_dep_depinfo, true);
|
||||
tracked!(box_noalias, Some(false));
|
||||
tracked!(box_noalias, false);
|
||||
tracked!(
|
||||
branch_protection,
|
||||
Some(BranchProtection {
|
||||
|
@ -1255,7 +1255,7 @@ options! {
|
||||
binary_dep_depinfo: bool = (false, parse_bool, [TRACKED],
|
||||
"include artifacts (sysroot, crate dependencies) used during compilation in dep-info \
|
||||
(default: no)"),
|
||||
box_noalias: Option<bool> = (None, parse_opt_bool, [TRACKED],
|
||||
box_noalias: bool = (true, parse_bool, [TRACKED],
|
||||
"emit noalias metadata for box (default: yes)"),
|
||||
branch_protection: Option<BranchProtection> = (None, parse_branch_protection, [TRACKED],
|
||||
"set options for branch target identification and pointer authentication on AArch64"),
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user