-error: this argument is passed by reference, but would be more efficient if passed by value
- --> $DIR/trivially_copy_pass_by_ref.rs:57: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
|
-57 | 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:57: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
|
-57 | 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:57: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
|
-57 | 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:67: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
|
-67 | 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:67: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
|
-67 | 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:67: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
|
-67 | 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:67: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
|
-67 | 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:70: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
|
-70 | 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:70: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
|
-70 | 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:70: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
|
-70 | 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:84: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
|
-84 | 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:84: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
|
-84 | 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:84: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
|
-84 | 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:89: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:76:34
|
-89 | fn trait_method(&self, _foo: &Foo);
+LL | fn trait_method(&self, _foo: &Foo);
| ^^^^ 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:93:37
+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
|
-93 | fn trait_method2(&self, _color: &Color);
+LL | fn trait_method2(&self, _color: &Color);
| ^^^^^^ help: consider passing by value instead: `Color`
error: aborting due to 15 previous errors