mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
match region patterns
This commit is contained in:
parent
683bffba08
commit
bc1eb84810
1 changed files with 6 additions and 6 deletions
|
@ -130,17 +130,17 @@ fn check_pat(cx: &Context, pat: &Pat, init: &Option<&Expr>, span: Span,
|
|||
},
|
||||
PatBox(ref inner) => {
|
||||
if let Some(ref initp) = *init {
|
||||
match initp.node {
|
||||
ExprBox(_, ref inner_init) =>
|
||||
check_pat(cx, inner, &Some(&**inner_init), span, bindings),
|
||||
//TODO: ExprCall on Box::new
|
||||
_ => check_pat(cx, inner, init, span, bindings),
|
||||
if let ExprBox(_, ref inner_init) = initp.node {
|
||||
check_pat(cx, inner, &Some(&**inner_init), span, bindings),
|
||||
} else {
|
||||
check_pat(cx, inner, init, span, bindings),
|
||||
}
|
||||
} else {
|
||||
check_pat(cx, inner, init, span, bindings);
|
||||
}
|
||||
},
|
||||
//PatRegion(P<Pat>, Mutability),
|
||||
PatRegion(ref inner, _) =>
|
||||
check_pat(cx, inner, init, span, bindings),
|
||||
//PatRange(P<Expr>, P<Expr>),
|
||||
//PatVec(Vec<P<Pat>>, Option<P<Pat>>, Vec<P<Pat>>),
|
||||
_ => (),
|
||||
|
|
Loading…
Reference in a new issue