2023-07-28 13:40:44 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:52:11
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
|
2020-04-02 20:46:01 -05:00
|
|
|
note: the lint level is defined here
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:3:9
|
2020-04-02 20:46:01 -05:00
|
|
|
|
|
|
|
|
LL | #![deny(clippy::trivially_copy_pass_by_ref)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-05-27 07:32:03 -05:00
|
|
|
|
2023-07-28 13:40:44 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:52:20
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2023-07-28 13:40:44 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:52:29
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:61:12
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^^ help: consider passing by value instead: `self`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:61:22
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:61:31
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:61:40
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:67:16
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:67:25
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:67:34
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:72:35
|
2021-08-05 11:11:08 -05:00
|
|
|
|
|
|
|
|
LL | fn bad_issue7518(self, other: &Self) {}
|
|
|
|
| ^^^^^ help: consider passing by value instead: `Self`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:85:16
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `u32`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:85:25
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:85:34
|
2018-05-27 07:32:03 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn bad2(x: &u32, y: &Foo, z: &Baz) {}
|
2018-05-27 07:32:03 -05:00
|
|
|
| ^^^^ help: consider passing by value instead: `Baz`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:92:34
|
2018-11-20 19:59:02 -06:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | fn trait_method(&self, _foo: &Foo);
|
2018-11-20 19:59:02 -06:00
|
|
|
| ^^^^ help: consider passing by value instead: `Foo`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:125:21
|
2020-08-22 03:35:18 -05:00
|
|
|
|
|
|
|
|
LL | fn foo_never(x: &i32) {
|
|
|
|
| ^^^^ help: consider passing by value instead: `i32`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:131:15
|
2020-08-22 03:35:18 -05:00
|
|
|
|
|
|
|
|
LL | fn foo(x: &i32) {
|
|
|
|
| ^^^^ help: consider passing by value instead: `i32`
|
|
|
|
|
2023-07-28 08:24:40 -05:00
|
|
|
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: 8 byte)
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/trivially_copy_pass_by_ref.rs:159:37
|
2022-04-05 20:14:42 -05:00
|
|
|
|
|
|
|
|
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 07:32:03 -05:00
|
|
|
|