Programmatically convert some of the pat ctors
This commit is contained in:
parent
f0f224a37f
commit
ff0c31e6b9
77 changed files with 136 additions and 168 deletions
|
@ -70,10 +70,8 @@ fn unsize_ptr<'tcx>(
|
|||
) -> (Value, Value) {
|
||||
match (&src_layout.ty.kind(), &dst_layout.ty.kind()) {
|
||||
(&ty::Ref(_, a, _), &ty::Ref(_, b, _))
|
||||
| (&ty::Ref(_, a, _), &ty::RawPtr(ty::TypeAndMut { ty: b, .. }))
|
||||
| (&ty::RawPtr(ty::TypeAndMut { ty: a, .. }), &ty::RawPtr(ty::TypeAndMut { ty: b, .. })) => {
|
||||
(src, unsized_info(fx, *a, *b, old_info))
|
||||
}
|
||||
| (&ty::Ref(_, a, _), &ty::RawPtr(b, _))
|
||||
| (&ty::RawPtr(a, _), &ty::RawPtr(b, _)) => (src, unsized_info(fx, *a, *b, old_info)),
|
||||
(&ty::Adt(def_a, _), &ty::Adt(def_b, _)) => {
|
||||
assert_eq!(def_a, def_b);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue