diff options
| author | bors <bors@rust-lang.org> | 2024-03-22 20:34:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-22 20:34:14 +0000 |
| commit | 85e449a3237e82c9ade8936a82bd4fc64cfe1057 (patch) | |
| tree | 90262068b86e8edcea7d4e495a02a90a76176391 /compiler/rustc_monomorphize/src | |
| parent | b3df0d7e5ef5f7dbeeca3fb289c65680ad013f87 (diff) | |
| parent | 6a40dabff94a05e8577ec0fe222c0d00eba951ec (diff) | |
| download | rust-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_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index 673cd968e28..a51b1c34a1a 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -1211,10 +1211,8 @@ fn find_vtable_types_for_unsizing<'tcx>( }; match (&source_ty.kind(), &target_ty.kind()) { - (&ty::Ref(_, a, _), &ty::Ref(_, b, _) | &ty::RawPtr(ty::TypeAndMut { ty: b, .. })) - | (&ty::RawPtr(ty::TypeAndMut { ty: a, .. }), &ty::RawPtr(ty::TypeAndMut { ty: b, .. })) => { - ptr_vtable(*a, *b) - } + (&ty::Ref(_, a, _), &ty::Ref(_, b, _) | &ty::RawPtr(b, _)) + | (&ty::RawPtr(a, _), &ty::RawPtr(b, _)) => ptr_vtable(*a, *b), (&ty::Adt(def_a, _), &ty::Adt(def_b, _)) if def_a.is_box() && def_b.is_box() => { ptr_vtable(source_ty.boxed_ty(), target_ty.boxed_ty()) } |
