error[E0666]: nested `impl Trait` is not allowed
- --> $DIR/nested_impl_trait.rs:16:56
+ --> $DIR/nested_impl_trait.rs:14:56
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ----------^^^^^^^^^^-
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
- --> $DIR/nested_impl_trait.rs:19:42
+ --> $DIR/nested_impl_trait.rs:17:42
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
| ----------^^^^^^^^^^-
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
- --> $DIR/nested_impl_trait.rs:23:37
+ --> $DIR/nested_impl_trait.rs:21:37
|
LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
| ----------^^^^^^^^^^-
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
- --> $DIR/nested_impl_trait.rs:28:44
+ --> $DIR/nested_impl_trait.rs:26:44
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
| ----------^^^^^^^^^^-
| outer `impl Trait`
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
- --> $DIR/nested_impl_trait.rs:19:32
+ --> $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:36:42
+ --> $DIR/nested_impl_trait.rs:34:42
|
LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
| ^^^^^^^^^^^^^^