-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:42:11
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:51:11
|
-42 | fn bad(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `u32`
|
- = note: `-D clippy::trivially-copy-pass-by-ref` implied by `-D warnings`
+note: the lint level is defined here
+ --> $DIR/trivially_copy_pass_by_ref.rs:4:9
+ |
+LL | #![deny(clippy::trivially_copy_pass_by_ref)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:42:20
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:51:20
|
-42 | fn bad(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `Foo`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:42:29
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:51:29
|
-42 | fn bad(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `Baz`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:52:12
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:58:12
|
-52 | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
| ^^^^^ help: consider passing by value instead: `self`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:52:22
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:58:22
|
-52 | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `u32`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:52:31
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:58:31
|
-52 | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `Foo`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:52:40
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:58:40
|
-52 | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `Baz`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:55:16
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:60:16
|
-55 | fn bad2(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `u32`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:55:25
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:60:25
|
-55 | fn bad2(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `Foo`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:55:34
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:60:34
|
-55 | fn bad2(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `Baz`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:69:16
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:72:16
|
-69 | fn bad2(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `u32`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:69:25
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:72:25
|
-69 | fn bad2(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `Foo`
-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:69:34
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:72:34
|
-69 | fn bad2(x: &u32, y: &Foo, z: &Baz) {
+LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
| ^^^^ help: consider passing by value instead: `Baz`
-error: aborting due to 13 previous errors
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:76:34
+ |
+LL | fn trait_method(&self, _foo: &Foo);
+ | ^^^^ help: consider passing by value instead: `Foo`
+
+error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
+ --> $DIR/trivially_copy_pass_by_ref.rs:80:37
+ |
+LL | fn trait_method2(&self, _color: &Color);
+ | ^^^^^^ help: consider passing by value instead: `Color`
+
+error: aborting due to 15 previous errors