Merge commit 'fdb84cbfd2' into clippyup
This commit is contained in:
parent
f88a1399bb
commit
7d4daaa8fa
165 changed files with 3427 additions and 963 deletions
|
|
@ -169,7 +169,12 @@ pub fn eq_expr(l: &Expr, r: &Expr) -> bool {
|
|||
(Field(lp, lf), Field(rp, rf)) => eq_id(*lf, *rf) && eq_expr(lp, rp),
|
||||
(Match(ls, la), Match(rs, ra)) => eq_expr(ls, rs) && over(la, ra, eq_arm),
|
||||
(Closure(lb, lc, la, lm, lf, le, _), Closure(rb, rc, ra, rm, rf, re, _)) => {
|
||||
eq_closure_binder(lb, rb) && lc == rc && la.is_async() == ra.is_async() && lm == rm && eq_fn_decl(lf, rf) && eq_expr(le, re)
|
||||
eq_closure_binder(lb, rb)
|
||||
&& lc == rc
|
||||
&& la.is_async() == ra.is_async()
|
||||
&& lm == rm
|
||||
&& eq_fn_decl(lf, rf)
|
||||
&& eq_expr(le, re)
|
||||
},
|
||||
(Async(lc, _, lb), Async(rc, _, rb)) => lc == rc && eq_block(lb, rb),
|
||||
(Range(lf, lt, ll), Range(rf, rt, rl)) => ll == rl && eq_expr_opt(lf, rf) && eq_expr_opt(lt, rt),
|
||||
|
|
@ -564,8 +569,9 @@ pub fn eq_fn_decl(l: &FnDecl, r: &FnDecl) -> bool {
|
|||
pub fn eq_closure_binder(l: &ClosureBinder, r: &ClosureBinder) -> bool {
|
||||
match (l, r) {
|
||||
(ClosureBinder::NotPresent, ClosureBinder::NotPresent) => true,
|
||||
(ClosureBinder::For { generic_params: lp, .. }, ClosureBinder::For { generic_params: rp, .. }) =>
|
||||
lp.len() == rp.len() && std::iter::zip(lp.iter(), rp.iter()).all(|(l, r)| eq_generic_param(l, r)),
|
||||
(ClosureBinder::For { generic_params: lp, .. }, ClosureBinder::For { generic_params: rp, .. }) => {
|
||||
lp.len() == rp.len() && std::iter::zip(lp.iter(), rp.iter()).all(|(l, r)| eq_generic_param(l, r))
|
||||
},
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
@ -610,7 +616,7 @@ pub fn eq_ext(l: &Extern, r: &Extern) -> bool {
|
|||
use Extern::*;
|
||||
match (l, r) {
|
||||
(None, None) | (Implicit(_), Implicit(_)) => true,
|
||||
(Explicit(l,_), Explicit(r,_)) => eq_str_lit(l, r),
|
||||
(Explicit(l, _), Explicit(r, _)) => eq_str_lit(l, r),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue