mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
110 lines
5.2 KiB
Text
110 lines
5.2 KiB
Text
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:47:11
|
|
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
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 (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:47:20
|
|
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ 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:47:29
|
|
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
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:54:12
|
|
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^^ help: consider passing by value instead: `self`
|
|
|
|
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:54:22
|
|
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
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:54:31
|
|
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ 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:54:40
|
|
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
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:56:16
|
|
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
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:56:25
|
|
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ 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:56:34
|
|
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
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:35
|
|
|
|
|
LL | fn bad_issue7518(self, other: &Self) {}
|
|
| ^^^^^ help: consider passing by value instead: `Self`
|
|
|
|
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:70:16
|
|
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
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:70:25
|
|
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ 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:70:34
|
|
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
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:74: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:106:21
|
|
|
|
|
LL | fn foo_never(x: &i32) {
|
|
| ^^^^ help: consider passing by value instead: `i32`
|
|
|
|
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:111:15
|
|
|
|
|
LL | fn foo(x: &i32) {
|
|
| ^^^^ help: consider passing by value instead: `i32`
|
|
|
|
error: aborting due to 17 previous errors
|
|
|