mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
116 lines
5.6 KiB
Text
116 lines
5.6 KiB
Text
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:52:11
|
|
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
note: the lint level is defined here
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:3: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:52: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:52: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:61: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:61: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:61: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:61: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:67: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:67: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:67: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:72: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:85: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:85: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:85: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:92: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:125: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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:131:15
|
|
|
|
|
LL | fn foo(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: 8 byte)
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:159:37
|
|
|
|
|
LL | fn _unrelated_lifetimes<'a, 'b>(_x: &'a u32, y: &'b u32) -> &'b u32 {
|
|
| ^^^^^^^ help: consider passing by value instead: `u32`
|
|
|
|
error: aborting due to 18 previous errors
|
|
|