Skip to content

Commit

Permalink
Ignore needless_pass_by_ref_mut clippy lint in generated traits
Browse files Browse the repository at this point in the history
    warning: this argument is a mutable reference, but not used mutably
       --> src/gen/fold.rs:819:30
        |
    819 | pub fn fold_attr_style<F>(f: &mut F, node: AttrStyle) -> AttrStyle
        |                              ^^^^^^ help: consider changing to: `&F`
        |
        = warning: changing this function will impact semver compatibility
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
        = note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::all`

    warning: this argument is a mutable reference, but not used mutably
       --> src/gen/fold.rs:864:26
        |
    864 | pub fn fold_bin_op<F>(f: &mut F, node: BinOp) -> BinOp
        |                          ^^^^^^ help: consider changing to: `&F`
        |
        = warning: changing this function will impact semver compatibility
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:1537:36
         |
    1537 | pub fn fold_field_mutability<F>(f: &mut F, node: FieldMutability) -> FieldMutability
         |                                    ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:1840:36
         |
    1840 | pub fn fold_impl_restriction<F>(f: &mut F, node: ImplRestriction) -> ImplRestriction
         |                                    ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2266:35
         |
    2266 | pub fn fold_macro_delimiter<F>(f: &mut F, node: MacroDelimiter) -> MacroDelimiter
         |                                   ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2569:32
         |
    2569 | pub fn fold_range_limits<F>(f: &mut F, node: RangeLimits) -> RangeLimits
         |                                ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2624:24
         |
    2624 | pub fn fold_span<F>(f: &mut F, node: Span) -> Span
         |                        ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2631:37
         |
    2631 | pub fn fold_static_mutability<F>(f: &mut F, node: StaticMutability) -> StaticMutability
         |                                     ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2679:8
         |
    2679 |     f: &mut F,
         |        ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2840:30
         |
    2840 | pub fn fold_type_infer<F>(f: &mut F, node: TypeInfer) -> TypeInfer
         |                              ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2858:30
         |
    2858 | pub fn fold_type_never<F>(f: &mut F, node: TypeNever) -> TypeNever
         |                              ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2970:25
         |
    2970 | pub fn fold_un_op<F>(f: &mut F, node: UnOp) -> UnOp
         |                         ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/fold.rs:2981:28
         |
    2981 | pub fn fold_use_glob<F>(f: &mut F, node: UseGlob) -> UseGlob
         |                            ^^^^^^ help: consider changing to: `&F`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
       --> src/gen/visit.rs:822:37
        |
    822 | pub fn visit_attr_style<'ast, V>(v: &mut V, node: &'ast AttrStyle)
        |                                     ^^^^^^ help: consider changing to: `&V`
        |
        = warning: changing this function will impact semver compatibility
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
       --> src/gen/visit.rs:873:33
        |
    873 | pub fn visit_bin_op<'ast, V>(v: &mut V, node: &'ast BinOp)
        |                                 ^^^^^^ help: consider changing to: `&V`
        |
        = warning: changing this function will impact semver compatibility
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:1732:43
         |
    1732 | pub fn visit_field_mutability<'ast, V>(v: &mut V, node: &'ast FieldMutability)
         |                                           ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2052:43
         |
    2052 | pub fn visit_impl_restriction<'ast, V>(v: &mut V, node: &'ast ImplRestriction)
         |                                           ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2451:35
         |
    2451 | pub fn visit_lit_byte<'ast, V>(v: &mut V, node: &'ast LitByte)
         |                                   ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2455:39
         |
    2455 | pub fn visit_lit_byte_str<'ast, V>(v: &mut V, node: &'ast LitByteStr)
         |                                       ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2459:35
         |
    2459 | pub fn visit_lit_char<'ast, V>(v: &mut V, node: &'ast LitChar)
         |                                   ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2463:36
         |
    2463 | pub fn visit_lit_float<'ast, V>(v: &mut V, node: &'ast LitFloat)
         |                                    ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2467:34
         |
    2467 | pub fn visit_lit_int<'ast, V>(v: &mut V, node: &'ast LitInt)
         |                                  ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2471:34
         |
    2471 | pub fn visit_lit_str<'ast, V>(v: &mut V, node: &'ast LitStr)
         |                                  ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2513:42
         |
    2513 | pub fn visit_macro_delimiter<'ast, V>(v: &mut V, node: &'ast MacroDelimiter)
         |                                          ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2877:39
         |
    2877 | pub fn visit_range_limits<'ast, V>(v: &mut V, node: &'ast RangeLimits)
         |                                       ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2946:31
         |
    2946 | pub fn visit_span<'ast, V>(v: &mut V, node: &Span)
         |                               ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:2951:44
         |
    2951 | pub fn visit_static_mutability<'ast, V>(v: &mut V, node: &'ast StaticMutability)
         |                                            ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:3007:47
         |
    3007 | pub fn visit_trait_bound_modifier<'ast, V>(v: &mut V, node: &'ast TraitBoundModifier)
         |                                               ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:3213:37
         |
    3213 | pub fn visit_type_infer<'ast, V>(v: &mut V, node: &'ast TypeInfer)
         |                                     ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:3227:37
         |
    3227 | pub fn visit_type_never<'ast, V>(v: &mut V, node: &'ast TypeNever)
         |                                     ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:3340:32
         |
    3340 | pub fn visit_un_op<'ast, V>(v: &mut V, node: &'ast UnOp)
         |                                ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit.rs:3357:35
         |
    3357 | pub fn visit_use_glob<'ast, V>(v: &mut V, node: &'ast UseGlob)
         |                                   ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
       --> src/gen/visit_mut.rs:823:35
        |
    823 | pub fn visit_attr_style_mut<V>(v: &mut V, node: &mut AttrStyle)
        |                                   ^^^^^^ help: consider changing to: `&V`
        |
        = warning: changing this function will impact semver compatibility
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
       --> src/gen/visit_mut.rs:874:31
        |
    874 | pub fn visit_bin_op_mut<V>(v: &mut V, node: &mut BinOp)
        |                               ^^^^^^ help: consider changing to: `&V`
        |
        = warning: changing this function will impact semver compatibility
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:1733:41
         |
    1733 | pub fn visit_field_mutability_mut<V>(v: &mut V, node: &mut FieldMutability)
         |                                         ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:1733:55
         |
    1733 | pub fn visit_field_mutability_mut<V>(v: &mut V, node: &mut FieldMutability)
         |                                                       ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&FieldMutability`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2055:41
         |
    2055 | pub fn visit_impl_restriction_mut<V>(v: &mut V, node: &mut ImplRestriction)
         |                                         ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2055:55
         |
    2055 | pub fn visit_impl_restriction_mut<V>(v: &mut V, node: &mut ImplRestriction)
         |                                                       ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&ImplRestriction`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2454:33
         |
    2454 | pub fn visit_lit_byte_mut<V>(v: &mut V, node: &mut LitByte)
         |                                 ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2454:47
         |
    2454 | pub fn visit_lit_byte_mut<V>(v: &mut V, node: &mut LitByte)
         |                                               ^^^^^^^^^^^^ help: consider changing to: `&LitByte`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2458:37
         |
    2458 | pub fn visit_lit_byte_str_mut<V>(v: &mut V, node: &mut LitByteStr)
         |                                     ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2458:51
         |
    2458 | pub fn visit_lit_byte_str_mut<V>(v: &mut V, node: &mut LitByteStr)
         |                                                   ^^^^^^^^^^^^^^^ help: consider changing to: `&LitByteStr`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2462:33
         |
    2462 | pub fn visit_lit_char_mut<V>(v: &mut V, node: &mut LitChar)
         |                                 ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2462:47
         |
    2462 | pub fn visit_lit_char_mut<V>(v: &mut V, node: &mut LitChar)
         |                                               ^^^^^^^^^^^^ help: consider changing to: `&LitChar`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2466:34
         |
    2466 | pub fn visit_lit_float_mut<V>(v: &mut V, node: &mut LitFloat)
         |                                  ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2466:48
         |
    2466 | pub fn visit_lit_float_mut<V>(v: &mut V, node: &mut LitFloat)
         |                                                ^^^^^^^^^^^^^ help: consider changing to: `&LitFloat`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2470:32
         |
    2470 | pub fn visit_lit_int_mut<V>(v: &mut V, node: &mut LitInt)
         |                                ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2470:46
         |
    2470 | pub fn visit_lit_int_mut<V>(v: &mut V, node: &mut LitInt)
         |                                              ^^^^^^^^^^^ help: consider changing to: `&LitInt`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2474:32
         |
    2474 | pub fn visit_lit_str_mut<V>(v: &mut V, node: &mut LitStr)
         |                                ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2474:46
         |
    2474 | pub fn visit_lit_str_mut<V>(v: &mut V, node: &mut LitStr)
         |                                              ^^^^^^^^^^^ help: consider changing to: `&LitStr`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2516:40
         |
    2516 | pub fn visit_macro_delimiter_mut<V>(v: &mut V, node: &mut MacroDelimiter)
         |                                        ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2880:37
         |
    2880 | pub fn visit_range_limits_mut<V>(v: &mut V, node: &mut RangeLimits)
         |                                     ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2949:29
         |
    2949 | pub fn visit_span_mut<V>(v: &mut V, node: &mut Span)
         |                             ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2949:43
         |
    2949 | pub fn visit_span_mut<V>(v: &mut V, node: &mut Span)
         |                                           ^^^^^^^^^ help: consider changing to: `&Span`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:2954:42
         |
    2954 | pub fn visit_static_mutability_mut<V>(v: &mut V, node: &mut StaticMutability)
         |                                          ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:3010:45
         |
    3010 | pub fn visit_trait_bound_modifier_mut<V>(v: &mut V, node: &mut TraitBoundModifier)
         |                                             ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:3216:35
         |
    3216 | pub fn visit_type_infer_mut<V>(v: &mut V, node: &mut TypeInfer)
         |                                   ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:3216:49
         |
    3216 | pub fn visit_type_infer_mut<V>(v: &mut V, node: &mut TypeInfer)
         |                                                 ^^^^^^^^^^^^^^ help: consider changing to: `&TypeInfer`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:3230:35
         |
    3230 | pub fn visit_type_never_mut<V>(v: &mut V, node: &mut TypeNever)
         |                                   ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:3230:49
         |
    3230 | pub fn visit_type_never_mut<V>(v: &mut V, node: &mut TypeNever)
         |                                                 ^^^^^^^^^^^^^^ help: consider changing to: `&TypeNever`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:3343:30
         |
    3343 | pub fn visit_un_op_mut<V>(v: &mut V, node: &mut UnOp)
         |                              ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:3360:33
         |
    3360 | pub fn visit_use_glob_mut<V>(v: &mut V, node: &mut UseGlob)
         |                                 ^^^^^^ help: consider changing to: `&V`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
        --> src/gen/visit_mut.rs:3360:47
         |
    3360 | pub fn visit_use_glob_mut<V>(v: &mut V, node: &mut UseGlob)
         |                                               ^^^^^^^^^^^^ help: consider changing to: `&UseGlob`
         |
         = warning: changing this function will impact semver compatibility
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
  • Loading branch information
dtolnay committed Jul 18, 2023
1 parent 517f0e9 commit 82c969e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
6 changes: 5 additions & 1 deletion codegen/src/fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ pub fn generate(defs: &Definitions) -> Result<()> {
quote! {
// Unreachable code is generated sometimes without the full feature.
#![allow(unreachable_code, unused_variables)]
#![allow(clippy::match_wildcard_for_single_variants, clippy::needless_match)]
#![allow(
clippy::match_wildcard_for_single_variants,
clippy::needless_match,
clippy::needless_pass_by_ref_mut,
)]

#[cfg(any(feature = "full", feature = "derive"))]
use crate::gen::helper::fold::*;
Expand Down
1 change: 1 addition & 0 deletions codegen/src/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ pub fn generate(defs: &Definitions) -> Result<()> {
VISIT_SRC,
quote! {
#![allow(unused_variables)]
#![allow(clippy::needless_pass_by_ref_mut)]

#[cfg(any(feature = "full", feature = "derive"))]
use crate::punctuated::Punctuated;
Expand Down
1 change: 1 addition & 0 deletions codegen/src/visit_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ pub fn generate(defs: &Definitions) -> Result<()> {
VISIT_MUT_SRC,
quote! {
#![allow(unused_variables)]
#![allow(clippy::needless_pass_by_ref_mut)]

#[cfg(any(feature = "full", feature = "derive"))]
use crate::punctuated::Punctuated;
Expand Down
6 changes: 5 additions & 1 deletion src/gen/fold.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/gen/visit.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/gen/visit_mut.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 82c969e

Please sign in to comment.