1 error[E0666]: nested `impl Trait` is not allowed
2 --> $DIR/where-allowed.rs:60:51
4 LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
7 | | nested `impl Trait` here
10 error[E0666]: nested `impl Trait` is not allowed
11 --> $DIR/where-allowed.rs:69:57
13 LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
16 | | nested `impl Trait` here
19 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
20 --> $DIR/where-allowed.rs:28:40
22 LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
25 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
26 --> $DIR/where-allowed.rs:32:42
28 LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
31 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
32 --> $DIR/where-allowed.rs:36:38
34 LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
37 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
38 --> $DIR/where-allowed.rs:40:40
40 LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
43 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
44 --> $DIR/where-allowed.rs:44:49
46 LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
49 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
50 --> $DIR/where-allowed.rs:48:51
52 LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
55 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
56 --> $DIR/where-allowed.rs:52:55
58 LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
61 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
62 --> $DIR/where-allowed.rs:56:57
64 LL | fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() }
67 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
68 --> $DIR/where-allowed.rs:60:51
70 LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
73 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
74 --> $DIR/where-allowed.rs:65:53
76 LL | fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() }
79 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
80 --> $DIR/where-allowed.rs:69:57
82 LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
85 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
86 --> $DIR/where-allowed.rs:74:59
88 LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!() }
91 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
92 --> $DIR/where-allowed.rs:78:38
94 LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
97 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
98 --> $DIR/where-allowed.rs:82:40
100 LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
103 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
104 --> $DIR/where-allowed.rs:95:32
106 LL | struct InBraceStructField { x: impl Debug }
109 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
110 --> $DIR/where-allowed.rs:99:41
112 LL | struct InAdtInBraceStructField { x: Vec<impl Debug> }
115 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
116 --> $DIR/where-allowed.rs:103:27
118 LL | struct InTupleStructField(impl Debug);
121 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
122 --> $DIR/where-allowed.rs:108:25
124 LL | InBraceVariant { x: impl Debug },
127 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
128 --> $DIR/where-allowed.rs:110:20
130 LL | InTupleVariant(impl Debug),
133 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
134 --> $DIR/where-allowed.rs:121:23
136 LL | fn in_return() -> impl Debug;
139 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
140 --> $DIR/where-allowed.rs:132:16
142 LL | type Out = impl Debug;
145 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
146 --> $DIR/where-allowed.rs:138:34
148 LL | fn in_trait_impl_return() -> impl Debug { () }
151 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
152 --> $DIR/where-allowed.rs:151:33
154 LL | fn in_foreign_parameters(_: impl Debug);
157 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
158 --> $DIR/where-allowed.rs:154:31
160 LL | fn in_foreign_return() -> impl Debug;
163 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
164 --> $DIR/where-allowed.rs:167:23
166 LL | type InTypeAlias<R> = impl Debug;
169 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
170 --> $DIR/where-allowed.rs:170:39
172 LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
175 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
176 --> $DIR/where-allowed.rs:174:16
178 LL | impl PartialEq<impl Debug> for () {
181 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
182 --> $DIR/where-allowed.rs:179:24
184 LL | impl PartialEq<()> for impl Debug {
187 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
188 --> $DIR/where-allowed.rs:184:6
190 LL | impl impl Debug {
193 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
194 --> $DIR/where-allowed.rs:190:24
196 LL | impl InInherentImplAdt<impl Debug> {
199 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
200 --> $DIR/where-allowed.rs:196:11
202 LL | where impl Debug: Debug
205 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
206 --> $DIR/where-allowed.rs:203:15
208 LL | where Vec<impl Debug>: Debug
211 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
212 --> $DIR/where-allowed.rs:210:24
214 LL | where T: PartialEq<impl Debug>
217 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
218 --> $DIR/where-allowed.rs:217:17
220 LL | where T: Fn(impl Debug)
223 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
224 --> $DIR/where-allowed.rs:224:22
226 LL | where T: Fn() -> impl Debug
229 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
230 --> $DIR/where-allowed.rs:230:29
232 LL | let _in_local_variable: impl Fn() = || {};
235 error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
236 --> $DIR/where-allowed.rs:232:46
238 LL | let _in_return_in_local_variable = || -> impl Fn() { || {} };
241 error: aborting due to 39 previous errors
243 Some errors occurred: E0562, E0666.
244 For more information about an error, try `rustc --explain E0562`.