From b6c606384471c26a06852c0586304965237c0b95 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 7 Jul 2024 13:17:49 -0700 Subject: [PATCH] Ignore trivially_copy_pass_by_ref pedantic clippy lint 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) { | ^^^^^^^^^^ 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)]` --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index cc8b628..6983455 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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;