mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 00:47:16 +00:00
Change syntax for TyAlias where clauses
This commit is contained in:
parent
90da7cdd41
commit
9bee01eb91
1 changed files with 6 additions and 42 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue