Add missing types to eq_ty
This commit is contained in:
parent
ee830ba55e
commit
5ddc615a40
|
@ -218,6 +218,9 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
|
||||||
fn eq_ty(&self, left: &Ty, right: &Ty) -> bool {
|
fn eq_ty(&self, left: &Ty, right: &Ty) -> bool {
|
||||||
match (&left.node, &right.node) {
|
match (&left.node, &right.node) {
|
||||||
(&TyVec(ref lvec), &TyVec(ref rvec)) => self.eq_ty(lvec, rvec),
|
(&TyVec(ref lvec), &TyVec(ref rvec)) => self.eq_ty(lvec, rvec),
|
||||||
|
(&TyFixedLengthVec(ref lt, ref ll), &TyFixedLengthVec(ref rt, ref rl)) => {
|
||||||
|
self.eq_ty(lt, rt) && self.eq_expr(ll, rl)
|
||||||
|
}
|
||||||
(&TyPtr(ref lmut), &TyPtr(ref rmut)) => lmut.mutbl == rmut.mutbl && self.eq_ty(&*lmut.ty, &*rmut.ty),
|
(&TyPtr(ref lmut), &TyPtr(ref rmut)) => lmut.mutbl == rmut.mutbl && self.eq_ty(&*lmut.ty, &*rmut.ty),
|
||||||
(&TyRptr(_, ref lrmut), &TyRptr(_, ref rrmut)) => {
|
(&TyRptr(_, ref lrmut), &TyRptr(_, ref rrmut)) => {
|
||||||
lrmut.mutbl == rrmut.mutbl && self.eq_ty(&*lrmut.ty, &*rrmut.ty)
|
lrmut.mutbl == rrmut.mutbl && self.eq_ty(&*lrmut.ty, &*rrmut.ty)
|
||||||
|
@ -225,6 +228,7 @@ impl<'a, 'tcx: 'a> SpanlessEq<'a, 'tcx> {
|
||||||
(&TyPath(ref lq, ref lpath), &TyPath(ref rq, ref rpath)) => {
|
(&TyPath(ref lq, ref lpath), &TyPath(ref rq, ref rpath)) => {
|
||||||
both(lq, rq, |l, r| self.eq_qself(l, r)) && self.eq_path(lpath, rpath)
|
both(lq, rq, |l, r| self.eq_qself(l, r)) && self.eq_path(lpath, rpath)
|
||||||
}
|
}
|
||||||
|
(&TyTup(ref l), &TyTup(ref r)) => over(l, r, |l, r| self.eq_ty(l, r)),
|
||||||
(&TyInfer, &TyInfer) => true,
|
(&TyInfer, &TyInfer) => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue