about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/abi
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-22 20:34:14 +0000
committerbors <bors@rust-lang.org>2024-03-22 20:34:14 +0000
commit85e449a3237e82c9ade8936a82bd4fc64cfe1057 (patch)
tree90262068b86e8edcea7d4e495a02a90a76176391 /compiler/rustc_codegen_cranelift/src/abi
parentb3df0d7e5ef5f7dbeeca3fb289c65680ad013f87 (diff)
parent6a40dabff94a05e8577ec0fe222c0d00eba951ec (diff)
downloadrust-85e449a3237e82c9ade8936a82bd4fc64cfe1057.tar.gz
rust-85e449a3237e82c9ade8936a82bd4fc64cfe1057.zip
Auto merge of #122852 - compiler-errors:raw-ptr, r=lcnr
Remove `TypeAndMut` from `ty::RawPtr` variant, make it take `Ty` and `Mutability`

Pretty much mechanically converting `ty::RawPtr(ty::TypeAndMut { ty, mutbl })` to `ty::RawPtr(ty, mutbl)` and its fallout.

r? lcnr

cc rust-lang/types-team#124
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/abi')
-rw-r--r--compiler/rustc_codegen_cranelift/src/abi/mod.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs
index b33587f8948..b0af421008a 100644
--- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs
+++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs
@@ -677,11 +677,7 @@ pub(crate) fn codegen_drop<'tcx>(
 
                 let arg_value = drop_place.place_ref(
                     fx,
-                    fx.layout_of(Ty::new_ref(
-                        fx.tcx,
-                        fx.tcx.lifetimes.re_erased,
-                        TypeAndMut { ty, mutbl: crate::rustc_hir::Mutability::Mut },
-                    )),
+                    fx.layout_of(Ty::new_mut_ref(fx.tcx, fx.tcx.lifetimes.re_erased, ty)),
                 );
                 let arg_value = adjust_arg_for_abi(fx, arg_value, &fn_abi.args[0], true);