diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-05-16 17:31:50 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-05-16 17:31:50 -0600 |
| commit | 4066c8ec718d8338c2fd6e00cb63e03d3544bcd1 (patch) | |
| tree | 7c6d8f39d6a240fa52d1b33e67c16ffa51f5040e /src/libsyntax/visit.rs | |
| parent | 8f61055c529d12a04ee077ad42a80b9f9b952cb1 (diff) | |
| parent | 282b40249e158376fcc4682879be40fb80c4e36f (diff) | |
Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkov
Fix some clippy warnings in libsyntax This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.
Diffstat (limited to 'src/libsyntax/visit.rs')
| -rw-r--r-- | src/libsyntax/visit.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libsyntax/visit.rs b/src/libsyntax/visit.rs index 9288d95009c..0b484a4e0af 100644 --- a/src/libsyntax/visit.rs +++ b/src/libsyntax/visit.rs @@ -345,9 +345,7 @@ pub fn walk_ty<'a, V: Visitor<'a>>(visitor: &mut V, typ: &'a Ty) { visitor.visit_ty(ty); visitor.visit_expr(expression) } - TyKind::TraitObject(ref bounds) => { - walk_list!(visitor, visit_ty_param_bound, bounds); - } + TyKind::TraitObject(ref bounds) | TyKind::ImplTrait(ref bounds) => { walk_list!(visitor, visit_ty_param_bound, bounds); } @@ -542,7 +540,7 @@ pub fn walk_fn<'a, V>(visitor: &mut V, kind: FnKind<'a>, declaration: &'a FnDecl walk_fn_decl(visitor, declaration); visitor.visit_block(body); } - FnKind::Method(_, ref sig, _, body) => { + FnKind::Method(_, sig, _, body) => { visitor.visit_generics(&sig.generics); walk_fn_decl(visitor, declaration); visitor.visit_block(body); @@ -778,7 +776,7 @@ pub fn walk_expr<'a, V: Visitor<'a>>(visitor: &mut V, expression: &'a Expr) { } ExprKind::InlineAsm(ref ia) => { for &(_, ref input) in &ia.inputs { - visitor.visit_expr(&input) + visitor.visit_expr(input) } for output in &ia.outputs { visitor.visit_expr(&output.expr) |
