diff options
| author | bors <bors@rust-lang.org> | 2024-03-19 05:50:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-19 05:50:28 +0000 |
| commit | bca5e2c1be77b82a95bda397c7c8f4a3b2b724a2 (patch) | |
| tree | 43eb5628d40bfad0faa9ffd0f857ad646ed133d5 /compiler/rustc_codegen_cranelift | |
| parent | b648a9a72873760f59ac7225d5314de5b4a2050d (diff) | |
| parent | be6c1704dc4097d13d27951c984bd99c4efa6f8e (diff) | |
| download | rust-bca5e2c1be77b82a95bda397c7c8f4a3b2b724a2.tar.gz rust-bca5e2c1be77b82a95bda397c7c8f4a3b2b724a2.zip | |
Auto merge of #3390 - rust-lang:rustup-2024-03-19, r=oli-obk
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/constant.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/constant.rs b/compiler/rustc_codegen_cranelift/src/constant.rs index 39fa277fedc..fc9b0f6ef02 100644 --- a/compiler/rustc_codegen_cranelift/src/constant.rs +++ b/compiler/rustc_codegen_cranelift/src/constant.rs @@ -74,7 +74,7 @@ pub(crate) fn eval_mir_constant<'tcx>( let cv = fx.monomorphize(constant.const_); // This cannot fail because we checked all required_consts in advance. let val = cv - .eval(fx.tcx, ty::ParamEnv::reveal_all(), Some(constant.span)) + .eval(fx.tcx, ty::ParamEnv::reveal_all(), constant.span) .expect("erroneous constant missed by mono item collection"); (val, cv.ty()) } diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs index 8b86a116df1..c802d9bbefb 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs @@ -728,8 +728,10 @@ fn codegen_regular_intrinsic_call<'tcx>( | sym::variant_count => { intrinsic_args!(fx, args => (); intrinsic); - let const_val = - fx.tcx.const_eval_instance(ParamEnv::reveal_all(), instance, None).unwrap(); + let const_val = fx + .tcx + .const_eval_instance(ParamEnv::reveal_all(), instance, source_info.span) + .unwrap(); let val = crate::constant::codegen_const_value(fx, const_val, ret.layout().ty); ret.write_cvalue(fx, val); } diff --git a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs index 79da970a58e..4d55a95aa9d 100644 --- a/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs +++ b/compiler/rustc_codegen_cranelift/src/intrinsics/simd.rs @@ -131,7 +131,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( let idx = generic_args[2] .expect_const() - .eval(fx.tcx, ty::ParamEnv::reveal_all(), Some(span)) + .eval(fx.tcx, ty::ParamEnv::reveal_all(), span) .unwrap() .unwrap_branch(); |
