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
This commit is contained in:
commit
85e449a323
126 changed files with 409 additions and 578 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue