1
Fork 0

lint on by ref patterns for references

This commit is contained in:
Oliver Schneider 2016-08-01 16:59:14 +02:00
parent 3464532294
commit 81c5757f44
No known key found for this signature in database
GPG key ID: 56D6EEA0FC67AC46
23 changed files with 69 additions and 51 deletions

View file

@ -59,8 +59,8 @@ impl LateLintPass for UnnecessaryMutPassed {
fn check_arguments(cx: &LateContext, arguments: &[P<Expr>], type_definition: &TyS, name: &str) {
match type_definition.sty {
TypeVariants::TyFnDef(_, _, ref fn_type) |
TypeVariants::TyFnPtr(ref fn_type) => {
TypeVariants::TyFnDef(_, _, fn_type) |
TypeVariants::TyFnPtr(fn_type) => {
let parameters = &fn_type.sig.skip_binder().inputs;
for (argument, parameter) in arguments.iter().zip(parameters.iter()) {
match parameter.sty {