lint on by ref patterns for references
This commit is contained in:
parent
3464532294
commit
81c5757f44
23 changed files with 69 additions and 51 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue