@@ -65,40 +65,46 @@ LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
65
65
| ^^^^ help: consider passing by value instead: `Baz`
66
66
67
67
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
68
- --> $DIR/trivially_copy_pass_by_ref.rs:72:16
68
+ --> $DIR/trivially_copy_pass_by_ref.rs:62:35
69
+ |
70
+ LL | fn bad_issue7518(self, other: &Self) {}
71
+ | ^^^^^ help: consider passing by value instead: `Self`
72
+
73
+ error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
74
+ --> $DIR/trivially_copy_pass_by_ref.rs:74:16
69
75
|
70
76
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
71
77
| ^^^^ help: consider passing by value instead: `u32`
72
78
73
79
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
74
- --> $DIR/trivially_copy_pass_by_ref.rs:72 :25
80
+ --> $DIR/trivially_copy_pass_by_ref.rs:74 :25
75
81
|
76
82
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
77
83
| ^^^^ help: consider passing by value instead: `Foo`
78
84
79
85
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
80
- --> $DIR/trivially_copy_pass_by_ref.rs:72 :34
86
+ --> $DIR/trivially_copy_pass_by_ref.rs:74 :34
81
87
|
82
88
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
83
89
| ^^^^ help: consider passing by value instead: `Baz`
84
90
85
91
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
86
- --> $DIR/trivially_copy_pass_by_ref.rs:76 :34
92
+ --> $DIR/trivially_copy_pass_by_ref.rs:78 :34
87
93
|
88
94
LL | fn trait_method(&self, _foo: &Foo);
89
95
| ^^^^ help: consider passing by value instead: `Foo`
90
96
91
97
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
92
- --> $DIR/trivially_copy_pass_by_ref.rs:108 :21
98
+ --> $DIR/trivially_copy_pass_by_ref.rs:110 :21
93
99
|
94
100
LL | fn foo_never(x: &i32) {
95
101
| ^^^^ help: consider passing by value instead: `i32`
96
102
97
103
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
98
- --> $DIR/trivially_copy_pass_by_ref.rs:113 :15
104
+ --> $DIR/trivially_copy_pass_by_ref.rs:115 :15
99
105
|
100
106
LL | fn foo(x: &i32) {
101
107
| ^^^^ help: consider passing by value instead: `i32`
102
108
103
- error: aborting due to 16 previous errors
109
+ error: aborting due to 17 previous errors
104
110
0 commit comments