summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/trivially_copy_pass_by_ref.stderr
blob: 6a8eca9655343a6e57bac72cdfb7b8c59afc4e94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
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:50:11
   |
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
   |           ^^^^ help: consider passing by value instead: `u32`
   |
note: the lint level is defined here
  --> $DIR/trivially_copy_pass_by_ref.rs:3:9
   |
LL | #![deny(clippy::trivially_copy_pass_by_ref)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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:50:20
   |
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
   |                    ^^^^ help: consider passing by value instead: `Foo`

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:50:29
   |
LL | fn bad(x: &u32, y: &Foo, z: &Baz) {}
   |                             ^^^^ help: consider passing by value instead: `Baz`

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:57:12
   |
LL |     fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
   |            ^^^^^ 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)
  --> $DIR/trivially_copy_pass_by_ref.rs:57:22
   |
LL |     fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
   |                      ^^^^ help: consider passing by value instead: `u32`

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:57:31
   |
LL |     fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
   |                               ^^^^ help: consider passing by value instead: `Foo`

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:57:40
   |
LL |     fn bad(&self, x: &u32, y: &Foo, z: &Baz) {}
   |                                        ^^^^ help: consider passing by value instead: `Baz`

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:59:16
   |
LL |     fn bad2(x: &u32, y: &Foo, z: &Baz) {}
   |                ^^^^ help: consider passing by value instead: `u32`

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:59:25
   |
LL |     fn bad2(x: &u32, y: &Foo, z: &Baz) {}
   |                         ^^^^ help: consider passing by value instead: `Foo`

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:59:34
   |
LL |     fn bad2(x: &u32, y: &Foo, z: &Baz) {}
   |                                  ^^^^ help: consider passing by value instead: `Baz`

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:61:35
   |
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)
  --> $DIR/trivially_copy_pass_by_ref.rs:73:16
   |
LL |     fn bad2(x: &u32, y: &Foo, z: &Baz) {}
   |                ^^^^ help: consider passing by value instead: `u32`

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:73:25
   |
LL |     fn bad2(x: &u32, y: &Foo, z: &Baz) {}
   |                         ^^^^ help: consider passing by value instead: `Foo`

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:73:34
   |
LL |     fn bad2(x: &u32, y: &Foo, z: &Baz) {}
   |                                  ^^^^ help: consider passing by value instead: `Baz`

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:77:34
   |
LL |     fn trait_method(&self, _foo: &Foo);
   |                                  ^^^^ help: consider passing by value instead: `Foo`

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:109:21
   |
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)
  --> $DIR/trivially_copy_pass_by_ref.rs:114:15
   |
LL |     fn foo(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)
  --> $DIR/trivially_copy_pass_by_ref.rs:141: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