mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 23:20:39 +00:00
82 lines
3.6 KiB
Text
82 lines
3.6 KiB
Text
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
|
|
|
|
|
42 | 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 is passed by reference, but would be more efficient if passed by value
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:42:20
|
|
|
|
|
42 | 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
|
|
|
|
|
42 | 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
|
|
|
|
|
52 | 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
|
|
|
|
|
52 | 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
|
|
|
|
|
52 | 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
|
|
|
|
|
52 | 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
|
|
|
|
|
55 | 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
|
|
|
|
|
55 | 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
|
|
|
|
|
55 | 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
|
|
|
|
|
69 | 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
|
|
|
|
|
69 | 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
|
|
|
|
|
69 | fn bad2(x: &u32, y: &Foo, z: &Baz) {
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
error: aborting due to 13 previous errors
|
|
|