Change syntax for TyAlias where clauses

This commit is contained in:
Jack Huey 2021-10-19 18:45:48 -04:00
parent 90da7cdd41
commit 9bee01eb91

View File

@ -279,20 +279,8 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
(ForeignMod(l), ForeignMod(r)) => { (ForeignMod(l), ForeignMod(r)) => {
both(&l.abi, &r.abi, eq_str_lit) && over(&l.items, &r.items, |l, r| eq_item(l, r, eq_foreign_item_kind)) both(&l.abi, &r.abi, eq_str_lit) && over(&l.items, &r.items, |l, r| eq_item(l, r, eq_foreign_item_kind))
}, },
( (TyAlias(box ast::TyAlias { defaultness: ld, generics: lg, bounds: lb, ty: lt, .. }),
TyAlias(box ast::TyAlias { TyAlias(box ast::TyAlias { defaultness: rd, generics: rg, bounds: rb, ty: rt, .. })) => {
defaultness: ld,
generics: lg,
bounds: lb,
ty: lt,
}),
TyAlias(box ast::TyAlias {
defaultness: rd,
generics: rg,
bounds: rb,
ty: rt,
}),
) => {
eq_defaultness(*ld, *rd) eq_defaultness(*ld, *rd)
&& eq_generics(lg, rg) && eq_generics(lg, rg)
&& over(lb, rb, eq_generic_bound) && over(lb, rb, eq_generic_bound)
@ -382,20 +370,8 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
) => { ) => {
eq_defaultness(*ld, *rd) && eq_fn_sig(lf, rf) && eq_generics(lg, rg) && both(lb, rb, |l, r| eq_block(l, r)) eq_defaultness(*ld, *rd) && eq_fn_sig(lf, rf) && eq_generics(lg, rg) && both(lb, rb, |l, r| eq_block(l, r))
}, },
( (TyAlias(box ast::TyAlias { defaultness: ld, generics: lg, bounds: lb, ty: lt, .. }),
TyAlias(box ast::TyAlias { TyAlias(box ast::TyAlias { defaultness: rd, generics: rg, bounds: rb, ty: rt, .. })) => {
defaultness: ld,
generics: lg,
bounds: lb,
ty: lt,
}),
TyAlias(box ast::TyAlias {
defaultness: rd,
generics: rg,
bounds: rb,
ty: rt,
}),
) => {
eq_defaultness(*ld, *rd) eq_defaultness(*ld, *rd)
&& eq_generics(lg, rg) && eq_generics(lg, rg)
&& over(lb, rb, eq_generic_bound) && over(lb, rb, eq_generic_bound)
@ -426,20 +402,8 @@ pub fn eq_assoc_item_kind(l: &AssocItemKind, r: &AssocItemKind) -> bool {
) => { ) => {
eq_defaultness(*ld, *rd) && eq_fn_sig(lf, rf) && eq_generics(lg, rg) && both(lb, rb, |l, r| eq_block(l, r)) eq_defaultness(*ld, *rd) && eq_fn_sig(lf, rf) && eq_generics(lg, rg) && both(lb, rb, |l, r| eq_block(l, r))
}, },
( (TyAlias(box ast::TyAlias { defaultness: ld, generics: lg, bounds: lb, ty: lt, .. }),
TyAlias(box ast::TyAlias { TyAlias(box ast::TyAlias { defaultness: rd, generics: rg, bounds: rb, ty: rt, .. })) => {
defaultness: ld,
generics: lg,
bounds: lb,
ty: lt,
}),
TyAlias(box ast::TyAlias {
defaultness: rd,
generics: rg,
bounds: rb,
ty: rt,
}),
) => {
eq_defaultness(*ld, *rd) eq_defaultness(*ld, *rd)
&& eq_generics(lg, rg) && eq_generics(lg, rg)
&& over(lb, rb, eq_generic_bound) && over(lb, rb, eq_generic_bound)