@@ -65,40 +65,46 @@ LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
6565 | ^^^^ help: consider passing by value instead: `Baz`
6666
6767error: 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
6975 |
7076LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
7177 | ^^^^ help: consider passing by value instead: `u32`
7278
7379error: 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
7581 |
7682LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
7783 | ^^^^ help: consider passing by value instead: `Foo`
7884
7985error: 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
8187 |
8288LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
8389 | ^^^^ help: consider passing by value instead: `Baz`
8490
8591error: 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
8793 |
8894LL | fn trait_method(&self, _foo: &Foo);
8995 | ^^^^ help: consider passing by value instead: `Foo`
9096
9197error: 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
9399 |
94100LL | fn foo_never(x: &i32) {
95101 | ^^^^ help: consider passing by value instead: `i32`
96102
97103error: 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
99105 |
100106LL | fn foo(x: &i32) {
101107 | ^^^^ help: consider passing by value instead: `i32`
102108
103- error: aborting due to 16 previous errors
109+ error: aborting due to 17 previous errors
104110
0 commit comments