]> git.lizzy.rs Git - rust.git/blob - tests/ui-fulldeps/internal-lints/rustc_pass_by_value.stderr
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui-fulldeps / internal-lints / rustc_pass_by_value.stderr
1 error: passing `Ty<'_>` by reference
2   --> $DIR/rustc_pass_by_value.rs:14:13
3    |
4 LL |     ty_ref: &Ty<'_>,
5    |             ^^^^^^^ help: try passing by value: `Ty<'_>`
6    |
7 note: the lint level is defined here
8   --> $DIR/rustc_pass_by_value.rs:5:9
9    |
10 LL | #![deny(rustc::pass_by_value)]
11    |         ^^^^^^^^^^^^^^^^^^^^
12
13 error: passing `TyCtxt<'_>` by reference
14   --> $DIR/rustc_pass_by_value.rs:16:18
15    |
16 LL |     ty_ctxt_ref: &TyCtxt<'_>,
17    |                  ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
18
19 error: passing `Ty<'_>` by reference
20   --> $DIR/rustc_pass_by_value.rs:20:28
21    |
22 LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
23    |                            ^^^^^^^ help: try passing by value: `Ty<'_>`
24
25 error: passing `TyCtxt<'_>` by reference
26   --> $DIR/rustc_pass_by_value.rs:20:55
27    |
28 LL | fn ty_multi_ref(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
29    |                                                       ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
30
31 error: passing `Ty<'_>` by reference
32   --> $DIR/rustc_pass_by_value.rs:27:17
33    |
34 LL |         ty_ref: &Ty<'_>,
35    |                 ^^^^^^^ help: try passing by value: `Ty<'_>`
36
37 error: passing `TyCtxt<'_>` by reference
38   --> $DIR/rustc_pass_by_value.rs:29:22
39    |
40 LL |         ty_ctxt_ref: &TyCtxt<'_>,
41    |                      ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
42
43 error: passing `Ty<'_>` by reference
44   --> $DIR/rustc_pass_by_value.rs:32:41
45    |
46 LL |     fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>);
47    |                                         ^^^^^^^ help: try passing by value: `Ty<'_>`
48
49 error: passing `TyCtxt<'_>` by reference
50   --> $DIR/rustc_pass_by_value.rs:32:68
51    |
52 LL |     fn ty_multi_ref_in_trait(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>);
53    |                                                                    ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
54
55 error: passing `Ty<'_>` by reference
56   --> $DIR/rustc_pass_by_value.rs:54:17
57    |
58 LL |         ty_ref: &Ty<'_>,
59    |                 ^^^^^^^ help: try passing by value: `Ty<'_>`
60
61 error: passing `TyCtxt<'_>` by reference
62   --> $DIR/rustc_pass_by_value.rs:56:22
63    |
64 LL |         ty_ctxt_ref: &TyCtxt<'_>,
65    |                      ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
66
67 error: passing `Ty<'_>` by reference
68   --> $DIR/rustc_pass_by_value.rs:60:38
69    |
70 LL |     fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
71    |                                      ^^^^^^^ help: try passing by value: `Ty<'_>`
72
73 error: passing `TyCtxt<'_>` by reference
74   --> $DIR/rustc_pass_by_value.rs:60:65
75    |
76 LL |     fn ty_multi_ref_assoc(ty_multi: &&Ty<'_>, ty_ctxt_multi: &&&&TyCtxt<'_>) {}
77    |                                                                 ^^^^^^^^^^^ help: try passing by value: `TyCtxt<'_>`
78
79 error: passing `CustomEnum` by reference
80   --> $DIR/rustc_pass_by_value.rs:74:20
81    |
82 LL |         reference: &CustomEnum,
83    |                    ^^^^^^^^^^^ help: try passing by value: `CustomEnum`
84
85 error: passing `CustomStruct` by reference
86   --> $DIR/rustc_pass_by_value.rs:85:24
87    |
88 LL | type CustomAlias<'a> = &'a CustomStruct;
89    |                        ^^^^^^^^^^^^^^^^ help: try passing by value: `CustomStruct`
90
91 error: passing `CustomStruct` by reference
92   --> $DIR/rustc_pass_by_value.rs:90:20
93    |
94 LL |         reference: &CustomStruct,
95    |                    ^^^^^^^^^^^^^ help: try passing by value: `CustomStruct`
96
97 error: passing `CustomAlias<'_>` by reference
98   --> $DIR/rustc_pass_by_value.rs:96:20
99    |
100 LL |         reference: &CustomAlias,
101    |                    ^^^^^^^^^^^^ help: try passing by value: `CustomAlias<'_>`
102
103 error: passing `WithParameters<T, 1>` by reference
104   --> $DIR/rustc_pass_by_value.rs:110:20
105    |
106 LL |         reference: &'a WithParameters<T, 1>,
107    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1>`
108
109 error: passing `WithParameters<T, 1, u32>` by reference
110   --> $DIR/rustc_pass_by_value.rs:111:27
111    |
112 LL |         reference_with_m: &WithParameters<T, 1, u32>,
113    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1, u32>`
114
115 error: passing `WithParameters<T, 1>` by reference
116   --> $DIR/rustc_pass_by_value.rs:112:10
117    |
118 LL |     ) -> &'a WithParameters<T, 1> {
119    |          ^^^^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<T, 1>`
120
121 error: passing `WithParameters<_, 1>` by reference
122   --> $DIR/rustc_pass_by_value.rs:114:22
123    |
124 LL |         reference as &WithParameters<_, 1>
125    |                      ^^^^^^^^^^^^^^^^^^^^^ help: try passing by value: `WithParameters<_, 1>`
126
127 error: aborting due to 20 previous errors
128