fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

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