]> git.proxmox.com Git - rustc.git/blob - src/test/ui/impl-trait/where-allowed.stderr
New upstream version 1.30.0~beta.7+dfsg1
[rustc.git] / src / test / ui / impl-trait / where-allowed.stderr
1 error[E0666]: nested `impl Trait` is not allowed
2 --> $DIR/where-allowed.rs:60:51
3 |
4 LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
5 | --------^^^^^^^^^^-
6 | | |
7 | | nested `impl Trait` here
8 | outer `impl Trait`
9
10 error[E0666]: nested `impl Trait` is not allowed
11 --> $DIR/where-allowed.rs:69:57
12 |
13 LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
14 | --------^^^^^^^^^^-
15 | | |
16 | | nested `impl Trait` here
17 | outer `impl Trait`
18
19 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
20 --> $DIR/where-allowed.rs:28:40
21 |
22 LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
23 | ^^^^^^^^^^
24
25 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
26 --> $DIR/where-allowed.rs:32:42
27 |
28 LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
29 | ^^^^^^^^^^
30
31 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
32 --> $DIR/where-allowed.rs:36:38
33 |
34 LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
35 | ^^^^^^^^^^
36
37 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
38 --> $DIR/where-allowed.rs:40:40
39 |
40 LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
41 | ^^^^^^^^^^
42
43 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
44 --> $DIR/where-allowed.rs:44:49
45 |
46 LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
47 | ^^^^^^^^^^
48
49 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
50 --> $DIR/where-allowed.rs:48:51
51 |
52 LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
53 | ^^^^^^^^^^
54
55 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
56 --> $DIR/where-allowed.rs:52:55
57 |
58 LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
59 | ^^^^^^^^^^
60
61 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
62 --> $DIR/where-allowed.rs:56:57
63 |
64 LL | fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() }
65 | ^^^^^^^^^^
66
67 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
68 --> $DIR/where-allowed.rs:60:51
69 |
70 LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
71 | ^^^^^^^^^^
72
73 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
74 --> $DIR/where-allowed.rs:65:53
75 |
76 LL | fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() }
77 | ^^^^^^^^^^
78
79 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
80 --> $DIR/where-allowed.rs:69:57
81 |
82 LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
83 | ^^^^^^^^^^
84
85 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
86 --> $DIR/where-allowed.rs:74:59
87 |
88 LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!() }
89 | ^^^^^^^^^^
90
91 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
92 --> $DIR/where-allowed.rs:78:38
93 |
94 LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
95 | ^^^^^^^^^^
96
97 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
98 --> $DIR/where-allowed.rs:82:40
99 |
100 LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
101 | ^^^^^^^^^^
102
103 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
104 --> $DIR/where-allowed.rs:95:32
105 |
106 LL | struct InBraceStructField { x: impl Debug }
107 | ^^^^^^^^^^
108
109 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
110 --> $DIR/where-allowed.rs:99:41
111 |
112 LL | struct InAdtInBraceStructField { x: Vec<impl Debug> }
113 | ^^^^^^^^^^
114
115 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
116 --> $DIR/where-allowed.rs:103:27
117 |
118 LL | struct InTupleStructField(impl Debug);
119 | ^^^^^^^^^^
120
121 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
122 --> $DIR/where-allowed.rs:108:25
123 |
124 LL | InBraceVariant { x: impl Debug },
125 | ^^^^^^^^^^
126
127 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
128 --> $DIR/where-allowed.rs:110:20
129 |
130 LL | InTupleVariant(impl Debug),
131 | ^^^^^^^^^^
132
133 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
134 --> $DIR/where-allowed.rs:121:23
135 |
136 LL | fn in_return() -> impl Debug;
137 | ^^^^^^^^^^
138
139 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
140 --> $DIR/where-allowed.rs:132:16
141 |
142 LL | type Out = impl Debug;
143 | ^^^^^^^^^^
144
145 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
146 --> $DIR/where-allowed.rs:138:34
147 |
148 LL | fn in_trait_impl_return() -> impl Debug { () }
149 | ^^^^^^^^^^
150
151 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
152 --> $DIR/where-allowed.rs:151:33
153 |
154 LL | fn in_foreign_parameters(_: impl Debug);
155 | ^^^^^^^^^^
156
157 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
158 --> $DIR/where-allowed.rs:154:31
159 |
160 LL | fn in_foreign_return() -> impl Debug;
161 | ^^^^^^^^^^
162
163 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
164 --> $DIR/where-allowed.rs:167:23
165 |
166 LL | type InTypeAlias<R> = impl Debug;
167 | ^^^^^^^^^^
168
169 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
170 --> $DIR/where-allowed.rs:170:39
171 |
172 LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
173 | ^^^^^^^^^^
174
175 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
176 --> $DIR/where-allowed.rs:174:16
177 |
178 LL | impl PartialEq<impl Debug> for () {
179 | ^^^^^^^^^^
180
181 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
182 --> $DIR/where-allowed.rs:179:24
183 |
184 LL | impl PartialEq<()> for impl Debug {
185 | ^^^^^^^^^^
186
187 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
188 --> $DIR/where-allowed.rs:184:6
189 |
190 LL | impl impl Debug {
191 | ^^^^^^^^^^
192
193 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
194 --> $DIR/where-allowed.rs:190:24
195 |
196 LL | impl InInherentImplAdt<impl Debug> {
197 | ^^^^^^^^^^
198
199 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
200 --> $DIR/where-allowed.rs:196:11
201 |
202 LL | where impl Debug: Debug
203 | ^^^^^^^^^^
204
205 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
206 --> $DIR/where-allowed.rs:203:15
207 |
208 LL | where Vec<impl Debug>: Debug
209 | ^^^^^^^^^^
210
211 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
212 --> $DIR/where-allowed.rs:210:24
213 |
214 LL | where T: PartialEq<impl Debug>
215 | ^^^^^^^^^^
216
217 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
218 --> $DIR/where-allowed.rs:217:17
219 |
220 LL | where T: Fn(impl Debug)
221 | ^^^^^^^^^^
222
223 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
224 --> $DIR/where-allowed.rs:224:22
225 |
226 LL | where T: Fn() -> impl Debug
227 | ^^^^^^^^^^
228
229 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
230 --> $DIR/where-allowed.rs:230:29
231 |
232 LL | let _in_local_variable: impl Fn() = || {};
233 | ^^^^^^^^^
234
235 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
236 --> $DIR/where-allowed.rs:232:46
237 |
238 LL | let _in_return_in_local_variable = || -> impl Fn() { || {} };
239 | ^^^^^^^^^
240
241 error: aborting due to 39 previous errors
242
243 Some errors occurred: E0562, E0666.
244 For more information about an error, try `rustc --explain E0562`.