2018-02-08 15:40:27 -08:00
error[E0666]: nested `impl Trait` is not allowed
2022-07-29 00:18:32 +04:00
--> $DIR/nested_impl_trait.rs:6:56
2018-02-08 15:40:27 -08:00
|
2018-02-25 02:59:34 +03:00
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
2018-02-08 15:40:27 -08:00
| ----------^^^^^^^^^^-
| | |
2018-02-13 17:46:33 -08:00
| | nested `impl Trait` here
2018-02-08 15:40:27 -08:00
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
2022-07-29 00:18:32 +04:00
--> $DIR/nested_impl_trait.rs:10:42
2018-02-08 15:40:27 -08:00
|
2018-02-25 02:59:34 +03:00
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
2018-02-08 15:40:27 -08:00
| ----------^^^^^^^^^^-
| | |
2018-02-13 17:46:33 -08:00
| | nested `impl Trait` here
2018-02-08 15:40:27 -08:00
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
2022-07-29 00:18:32 +04:00
--> $DIR/nested_impl_trait.rs:14:37
2018-02-08 15:40:27 -08:00
|
2018-02-25 02:59:34 +03:00
LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
2018-02-08 15:40:27 -08:00
| ----------^^^^^^^^^^-
| | |
2018-02-13 17:46:33 -08:00
| | nested `impl Trait` here
2018-02-08 15:40:27 -08:00
| outer `impl Trait`
error[E0666]: nested `impl Trait` is not allowed
2022-07-29 00:18:32 +04:00
--> $DIR/nested_impl_trait.rs:19:44
2018-02-08 15:40:27 -08:00
|
2018-02-25 02:59:34 +03:00
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
2018-02-08 15:40:27 -08:00
| ----------^^^^^^^^^^-
| | |
2018-02-13 17:46:33 -08:00
| | nested `impl Trait` here
2018-02-08 15:40:27 -08:00
| outer `impl Trait`
2024-01-07 17:11:48 +00:00
error[E0562]: `impl Trait` is not allowed in `fn` pointer return types
2022-07-29 00:18:32 +04:00
--> $DIR/nested_impl_trait.rs:10:32
2018-02-08 15:40:27 -08:00
|
2018-02-25 02:59:34 +03:00
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
2018-02-08 15:40:27 -08:00
| ^^^^^^^^^^^^^^^^^^^^^
2024-01-07 17:11:48 +00:00
|
= note: `impl Trait` is only allowed in arguments and return types of functions and methods
2018-02-08 15:40:27 -08:00
2024-02-21 14:29:28 +00:00
error[E0277]: the trait bound `impl Into<u32>: Into<impl Debug>` is not satisfied
2022-07-29 00:18:32 +04:00
--> $DIR/nested_impl_trait.rs:6:46
2022-02-14 16:10:22 +00:00
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
2024-06-11 06:49:12 +00:00
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Into<u32>`, which is required by `impl Into<u32>: Into<impl Debug>`
2022-02-14 16:10:22 +00:00
|
2024-06-11 06:49:12 +00:00
= help: the trait `Into<U>` is implemented for `T`
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
2022-02-14 16:10:22 +00:00
2024-02-21 14:29:28 +00:00
error[E0277]: the trait bound `impl Into<u32>: Into<impl Debug>` is not satisfied
2022-07-29 00:18:32 +04:00
--> $DIR/nested_impl_trait.rs:19:34
2022-02-14 16:10:22 +00:00
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
2024-06-11 06:49:12 +00:00
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Into<u32>`, which is required by `impl Into<u32>: Into<impl Debug>`
2022-02-14 16:10:22 +00:00
|
2024-06-11 06:49:12 +00:00
= help: the trait `Into<U>` is implemented for `T`
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
2022-02-14 16:10:22 +00:00
2022-02-02 15:09:44 +03:00
error: aborting due to 7 previous errors
2018-02-08 15:40:27 -08:00
2022-02-14 16:10:22 +00:00
Some errors have detailed explanations: E0277, E0562, E0666.
For more information about an error, try `rustc --explain E0277`.