diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index 46e8e2a71cb..869c8e981f9 100644 --- a/compiler/rustc_codegen_llvm/src/abi.rs +++ b/compiler/rustc_codegen_llvm/src/abi.rs @@ -62,7 +62,7 @@ fn should_use_mutable_noalias(cx: &CodegenCx<'_, '_>) -> bool { // // For now, do not enable mutable_noalias by default at all, while the // issue is being figured out. - cx.tcx.sess.opts.debugging_opts.mutable_noalias + cx.tcx.sess.opts.debugging_opts.mutable_noalias.unwrap_or(false) } impl ArgAttributesExt for ArgAttributes { diff --git a/compiler/rustc_interface/src/tests.rs b/compiler/rustc_interface/src/tests.rs index 93ba2e6a4f1..b3f0c66de68 100644 --- a/compiler/rustc_interface/src/tests.rs +++ b/compiler/rustc_interface/src/tests.rs @@ -566,7 +566,7 @@ fn test_debugging_options_tracking_hash() { tracked!(merge_functions, Some(MergeFunctions::Disabled)); tracked!(mir_emit_retag, true); tracked!(mir_opt_level, Some(4)); - tracked!(mutable_noalias, true); + tracked!(mutable_noalias, Some(true)); tracked!(new_llvm_pass_manager, true); tracked!(no_codegen, true); tracked!(no_generate_arange_section, true); diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index d9e5a186073..e8865a25081 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -997,7 +997,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, (default: no)"), mir_opt_level: Option = (None, parse_opt_uint, [TRACKED], "MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)"), - mutable_noalias: bool = (false, parse_bool, [TRACKED], + mutable_noalias: Option = (None, parse_opt_bool, [TRACKED], "emit noalias metadata for mutable references (default: no)"), new_llvm_pass_manager: bool = (false, parse_bool, [TRACKED], "use new LLVM pass manager (default: no)"),