mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-18 00:53:31 +00:00
94 lines
4.5 KiB
Text
94 lines
4.5 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:50:11
|
|
|
|
|
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`
|
|
|
|
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:50: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:50: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:57: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:57: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:57: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:57: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:59: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:59: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:59: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:71: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:71: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:71: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:75: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:79:37
|
|
|
|
|
LL | fn trait_method2(&self, _color: &Color);
|
|
| ^^^^^^ help: consider passing by value instead: `Color`
|
|
|
|
error: aborting due to 15 previous errors
|
|
|