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