Avoid taking reference of &TyKind
This commit is contained in:
parent
89103466d7
commit
48f43fa0ed
14 changed files with 18 additions and 18 deletions
|
@ -1035,9 +1035,9 @@ fn find_vtable_types_for_unsizing<'tcx>(
|
|||
}
|
||||
};
|
||||
|
||||
match (&source_ty.kind(), &target_ty.kind()) {
|
||||
match (source_ty.kind(), target_ty.kind()) {
|
||||
(&ty::Ref(_, a, _), &ty::Ref(_, b, _) | &ty::RawPtr(b, _))
|
||||
| (&ty::RawPtr(a, _), &ty::RawPtr(b, _)) => ptr_vtable(*a, *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