2018-08-08 12:28:26 +00:00
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:47:51
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
|
|
|
|
| --------^^^^^^^^^^-
|
|
|
|
| | |
|
|
|
|
| | nested `impl Trait` here
|
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:56:57
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
|
|
|
|
| --------^^^^^^^^^^-
|
|
|
|
| | |
|
|
|
|
| | nested `impl Trait` here
|
|
|
|
| outer `impl Trait`
|
|
|
|
|
2019-07-31 23:41:54 +00:00
|
|
|
error[E0658]: `impl Trait` in type aliases is unstable
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:119:16
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
|
|
|
LL | type Out = impl Debug;
|
2019-11-07 19:12:34 +00:00
|
|
|
| ^^^^^^^^^^
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
|
|
|
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
|
|
|
|
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
|
|
|
|
2019-07-31 23:41:54 +00:00
|
|
|
error[E0658]: `impl Trait` in type aliases is unstable
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:155:23
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
|
|
|
LL | type InTypeAlias<R> = impl Debug;
|
2019-11-07 19:12:34 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
|
|
|
|
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
|
|
|
|
|
|
|
error[E0658]: `impl Trait` in type aliases is unstable
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:159:39
|
2019-11-07 19:12:34 +00:00
|
|
|
|
|
|
|
|
LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
|
|
|
= note: for more information, see https://github.com/rust-lang/rust/issues/63063
|
|
|
|
= help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
|
|
|
|
|
2018-08-08 12:28:26 +00:00
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:15:40
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:19:42
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:23:38
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:27:40
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:31:49
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:35:51
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:39:55
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:43:57
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:47:51
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:52:53
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:56:57
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:61:59
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:65:38
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:69:40
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:82:32
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | struct InBraceStructField { x: impl Debug }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:86:41
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | struct InAdtInBraceStructField { x: Vec<impl Debug> }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:90:27
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | struct InTupleStructField(impl Debug);
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:95:25
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | InBraceVariant { x: impl Debug },
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:97:20
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | InTupleVariant(impl Debug),
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:108:23
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_return() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:126:34
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_trait_impl_return() -> impl Debug { () }
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:139:33
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_foreign_parameters(_: impl Debug);
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:142:31
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | fn in_foreign_return() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:159:39
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:164:16
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | impl PartialEq<impl Debug> for () {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:169:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | impl PartialEq<()> for impl Debug {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:174:6
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | impl impl Debug {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:180:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | impl InInherentImplAdt<impl Debug> {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:186:11
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where impl Debug: Debug
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:193:15
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where Vec<impl Debug>: Debug
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:200:24
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where T: PartialEq<impl Debug>
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:207:17
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where T: Fn(impl Debug)
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:214:22
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | where T: Fn() -> impl Debug
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:220:29
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let _in_local_variable: impl Fn() = || {};
|
|
|
|
| ^^^^^^^^^
|
2018-09-27 21:34:19 +00:00
|
|
|
|
|
2019-07-21 13:51:43 +00:00
|
|
|
= help: add `#![feature(impl_trait_in_bindings)]` to the crate attributes to enable
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:222:46
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | let _in_return_in_local_variable = || -> impl Fn() { || {} };
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
2019-07-29 23:11:58 +00:00
|
|
|
error: could not find defining uses
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:155:1
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
|
|
|
LL | type InTypeAlias<R> = impl Debug;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: could not find defining uses
|
2019-11-15 21:50:57 +00:00
|
|
|
--> $DIR/where-allowed.rs:119:5
|
2019-07-29 23:11:58 +00:00
|
|
|
|
|
|
|
|
LL | type Out = impl Debug;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2019-11-15 21:50:57 +00:00
|
|
|
error: aborting due to 42 previous errors
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2019-11-15 21:50:57 +00:00
|
|
|
Some errors have detailed explanations: E0562, E0658, E0666.
|
|
|
|
For more information about an error, try `rustc --explain E0562`.
|