summaryrefslogtreecommitdiffstats
path: root/tests/ui-fulldeps/internal-lints/rustc_pass_by_value.stderr
blob: 69cf20656d7b14dc8ea9503733e2f21e0e386780 (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
117
118
119
120
121
122
123
124
125
126
127
128
error: passing `Ty<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:14:13
   |
LL |     ty_ref: &Ty<'_>,
   |             ^^^^^^^ help: try passing by value: `Ty<'_>`
   |
note: the lint level is defined here
  --> $DIR/rustc_pass_by_value.rs:5:9
   |
LL | #![deny(rustc::pass_by_value)]
   |         ^^^^^^^^^^^^^^^^^^^^

error: passing `TyCtxt<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:16:18
   |
LL |     ty_ctxt_ref: &TyCtxt<'_>,
   |                  ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`

error: passing `Ty<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:20:28
   |
LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
   |                            ^^^^^^^ help: try passing by value: `Ty<'_>`

error: passing `TyCtxt<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:20:55
   |
LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
   |                                                       ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`

error: passing `Ty<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:27:17
   |
LL |         ty_ref: &Ty<'_>,
   |                 ^^^^^^^ help: try passing by value: `Ty<'_>`

error: passing `TyCtxt<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:29:22
   |
LL |         ty_ctxt_ref: &TyCtxt<'_>,
   |                      ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`

error: passing `Ty<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:32:41
   |
LL |     fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>);
   |                                         ^^^^^^^ help: try passing by value: `Ty<'_>`

error: passing `TyCtxt<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:32:68
   |
LL |     fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>);
   |                                                                    ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`

error: passing `Ty<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:54:17
   |
LL |         ty_ref: &Ty<'_>,
   |                 ^^^^^^^ help: try passing by value: `Ty<'_>`

error: passing `TyCtxt<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:56:22
   |
LL |         ty_ctxt_ref: &TyCtxt<'_>,
   |                      ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`

error: passing `Ty<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:60:38
   |
LL |     fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
   |                                      ^^^^^^^ help: try passing by value: `Ty<'_>`

error: passing `TyCtxt<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:60:65
   |
LL |     fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
   |                                                                 ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`

error: passing `CustomEnum` by reference
  --> $DIR/rustc_pass_by_value.rs:74:20
   |
LL |         reference: &CustomEnum,
   |                    ^^^^^^^^^^^ help: try passing by value: `CustomEnum`

error: passing `CustomStruct` by reference
  --> $DIR/rustc_pass_by_value.rs:85:24
   |
LL | type CustomAlias<'a> = &'a CustomStruct;
   |                        ^^^^^^^^^^^^^^^^ help: try passing by value: `CustomStruct`

error: passing `CustomStruct` by reference
  --> $DIR/rustc_pass_by_value.rs:90:20
   |
LL |         reference: &CustomStruct,
   |                    ^^^^^^^^^^^^^ help: try passing by value: `CustomStruct`

error: passing `CustomAlias<'_>` by reference
  --> $DIR/rustc_pass_by_value.rs:96:20
   |
LL |         reference: &CustomAlias,
   |                    ^^^^^^^^^^^^ help: try passing by value: `CustomAlias<'_>`

error: passing `WithParameters<T, 1>` by reference
  --> $DIR/rustc_pass_by_value.rs:110:20
   |
LL |         reference: &'a WithParameters<T, 1>,
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1>`

error: passing `WithParameters<T, 1, u32>` by reference
  --> $DIR/rustc_pass_by_value.rs:111:27
   |
LL |         reference_with_m: &WithParameters<T, 1, u32>,
   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1, u32>`

error: passing `WithParameters<T, 1>` by reference
  --> $DIR/rustc_pass_by_value.rs:112:10
   |
LL |     ) -> &'a WithParameters<T, 1> {
   |          ^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1>`

error: passing `WithParameters<_, 1>` by reference
  --> $DIR/rustc_pass_by_value.rs:114:22
   |
LL |         reference as &WithParameters<_, 1>
   |                      ^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<_, 1>`

error: aborting due to 20 previous errors