2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:47:11
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
|
2020-04-03 01:46:01 +00:00
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:4:9
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::trivially_copy_pass_by_ref)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-05-27 12:32:03 +00:00
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:47:20
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:47:29
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:54:12
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^^ help: consider passing by value instead: `self`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:54:22
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:54:31
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:54:40
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:56:16
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:56:25
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:56:34
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:58:35
|
2021-08-12 09:16:25 +00:00
|
|
|
|
|
|
|
|
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: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:70:16
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:70:25
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:70:34
|
2018-05-27 12:32:03 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 12:32:03 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
|
2019-05-06 19:41:05 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:74:34
|
2018-11-21 01:59:02 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | fn trait_method(&self, _foo: &Foo);
|
2018-11-21 01:59:02 +00:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2020-08-28 14:10:16 +00:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:106:21
|
2020-08-28 14:10:16 +00:00
|
|
|
|
|
|
|
|
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: N byte)
|
2021-09-28 17:03:12 +00:00
|
|
|
--> $DIR/trivially_copy_pass_by_ref.rs:111:15
|
2020-08-28 14:10:16 +00:00
|
|
|
|
|
|
|
|
LL | fn foo(x: &i32) {
|
|
|
|
| ^^^^ help: consider passing by value instead: `i32`
|
|
|
|
|
2022-06-30 08:50:09 +00:00
|
|
|
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:138: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
|
2018-05-27 12:32:03 +00:00
|
|
|
|