diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-03-30 15:43:48 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-03-30 15:43:48 +0000 |
| commit | 1111a9788650b6cde6f78250a81328f6ab211b51 (patch) | |
| tree | 8da5f804e24c7309bca11e50855c5a7d1c9c3926 /compiler/rustc_codegen_cranelift/src/num.rs | |
| parent | 45b40a75966b36d3588f173441896fddad01cd80 (diff) | |
| parent | ba315abda789c9f59f2100102232bddb30b0d3d3 (diff) | |
| download | rust-1111a9788650b6cde6f78250a81328f6ab211b51.tar.gz rust-1111a9788650b6cde6f78250a81328f6ab211b51.zip | |
Merge commit 'ba315abda789c9f59f2100102232bddb30b0d3d3' into sync_cg_clif-2025-03-30
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/num.rs')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/num.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/num.rs b/compiler/rustc_codegen_cranelift/src/num.rs index f44e2459a78..2a4d1e3ae57 100644 --- a/compiler/rustc_codegen_cranelift/src/num.rs +++ b/compiler/rustc_codegen_cranelift/src/num.rs @@ -395,8 +395,12 @@ pub(crate) fn codegen_ptr_binop<'tcx>( in_lhs: CValue<'tcx>, in_rhs: CValue<'tcx>, ) -> CValue<'tcx> { - let is_thin_ptr = - in_lhs.layout().ty.builtin_deref(true).map(|ty| !has_ptr_meta(fx.tcx, ty)).unwrap_or(true); + let is_thin_ptr = in_lhs + .layout() + .ty + .builtin_deref(true) + .map(|ty| !fx.tcx.type_has_metadata(ty, ty::TypingEnv::fully_monomorphized())) + .unwrap_or(true); if is_thin_ptr { match bin_op { |
