Run rustfmt

This commit is contained in:
Oliver Schneider
2017-08-01 10:19:49 +02:00
parent deed00a0a4
commit 5864072eca
2 changed files with 23 additions and 30 deletions

View File

@@ -226,13 +226,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
}
for arg in iter_input_pats(decl, body) {
match arg.pat.node {
PatKind::Binding(BindingAnnotation::Ref, _, _, _) | PatKind::Binding(BindingAnnotation::RefMut, _, _, _) => {
PatKind::Binding(BindingAnnotation::Ref, _, _, _) |
PatKind::Binding(BindingAnnotation::RefMut, _, _, _) => {
span_lint(cx,
TOPLEVEL_REF_ARG,
arg.pat.span,
"`ref` directly on a function argument is ignored. Consider using a reference type instead.");
"`ref` directly on a function argument is ignored. Consider using a reference type \
instead.");
},
_ => {}
_ => {},
}
}
}