Skip to content

Commit 72f8d6a

Browse files
committed
Change type of box_noalias to bool
1 parent 78075e1 commit 72f8d6a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_interface/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ fn test_unstable_options_tracking_hash() {
715715
tracked!(asm_comments, true);
716716
tracked!(assume_incomplete_release, true);
717717
tracked!(binary_dep_depinfo, true);
718-
tracked!(box_noalias, Some(false));
718+
tracked!(box_noalias, false);
719719
tracked!(
720720
branch_protection,
721721
Some(BranchProtection {

compiler/rustc_session/src/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ options! {
12551255
binary_dep_depinfo: bool = (false, parse_bool, [TRACKED],
12561256
"include artifacts (sysroot, crate dependencies) used during compilation in dep-info \
12571257
(default: no)"),
1258-
box_noalias: Option<bool> = (None, parse_opt_bool, [TRACKED],
1258+
box_noalias: bool = (true, parse_bool, [TRACKED],
12591259
"emit noalias metadata for box (default: yes)"),
12601260
branch_protection: Option<BranchProtection> = (None, parse_branch_protection, [TRACKED],
12611261
"set options for branch target identification and pointer authentication on AArch64"),

compiler/rustc_ty_utils/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ fn adjust_for_rust_scalar<'tcx>(
254254
// The aliasing rules for `Box<T>` are still not decided, but currently we emit
255255
// `noalias` for it. This can be turned off using an unstable flag.
256256
// See https://github.com/rust-lang/unsafe-code-guidelines/issues/326
257-
let noalias_for_box = cx.tcx.sess.opts.unstable_opts.box_noalias.unwrap_or(true);
257+
let noalias_for_box = cx.tcx.sess.opts.unstable_opts.box_noalias;
258258

259259
// LLVM prior to version 12 had known miscompiles in the presence of noalias attributes
260260
// (see #54878), so it was conditionally disabled, but we don't support earlier

0 commit comments

Comments
 (0)