Skip to content

Commit

Permalink
Ignore trivially_copy_pass_by_ref pedantic clippy lint
Browse files Browse the repository at this point in the history
When syn/clone-impls isn't enabled, this type is not Copy.

    warning: this argument (4 byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
      --> src/lifetime.rs:22:49
       |
    22 |     fn visit_opt_lifetime(&mut self, reference: &Token![&], lifetime: &mut Option<Lifetime>) {
       |                                                 ^^^^^^^^^^ help: consider passing by value instead: `$crate::token::And`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref
       = note: `-W clippy::trivially-copy-pass-by-ref` implied by `-W clippy::pedantic`
       = help: to override `-W clippy::pedantic` add `#[allow(clippy::trivially_copy_pass_by_ref)]`
  • Loading branch information
dtolnay committed Jul 7, 2024
1 parent 315fd90 commit b6c6063
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@
clippy::module_name_repetitions,
clippy::shadow_unrelated,
clippy::similar_names,
clippy::too_many_lines
clippy::too_many_lines,
clippy::trivially_copy_pass_by_ref
)]

extern crate proc_macro;
Expand Down

0 comments on commit b6c6063

Please sign in to comment.