blob: ee53194e2b484700b2d6dec0da7b64dce0061429 [file] [log] [blame]
error[E0666]: nested `impl Trait` is not allowed
--> $DIR/nested_impl_trait.rs:14:56
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ----------^^^^^^^^^^-
| | |
| | nested `impl Trait` here
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
--> $DIR/nested_impl_trait.rs:17:42
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
| ----------^^^^^^^^^^-
| | |
| | nested `impl Trait` here
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
--> $DIR/nested_impl_trait.rs:21:37
|
LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
| ----------^^^^^^^^^^-
| | |
| | nested `impl Trait` here
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
--> $DIR/nested_impl_trait.rs:26:44
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ----------^^^^^^^^^^-
| | |
| | nested `impl Trait` here
| outer `impl Trait`
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
--> $DIR/nested_impl_trait.rs:17:32
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
| ^^^^^^^^^^^^^^^^^^^^^
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
--> $DIR/nested_impl_trait.rs:34:42
|
LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
| ^^^^^^^^^^^^^^
error: aborting due to 6 previous errors
Some errors occurred: E0562, E0666.
For more information about an error, try `rustc --explain E0562`.