2018-02-08 23:40:27 +00:00
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/nested_impl_trait.rs:5:56
|
2018-02-08 23:40:27 +00:00
|
|
|
|
|
2018-02-24 23:59:34 +00:00
|
|
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
|
2018-02-08 23:40:27 +00:00
|
|
|
| ----------^^^^^^^^^^-
|
|
|
|
| | |
|
2018-02-14 01:46:33 +00:00
|
|
|
| | nested `impl Trait` here
|
2018-02-08 23:40:27 +00:00
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/nested_impl_trait.rs:9:42
|
2018-02-08 23:40:27 +00:00
|
|
|
|
|
2018-02-24 23:59:34 +00:00
|
|
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
|
2018-02-08 23:40:27 +00:00
|
|
|
| ----------^^^^^^^^^^-
|
|
|
|
| | |
|
2018-02-14 01:46:33 +00:00
|
|
|
| | nested `impl Trait` here
|
2018-02-08 23:40:27 +00:00
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/nested_impl_trait.rs:13:37
|
2018-02-08 23:40:27 +00:00
|
|
|
|
|
2018-02-24 23:59:34 +00:00
|
|
|
LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
|
2018-02-08 23:40:27 +00:00
|
|
|
| ----------^^^^^^^^^^-
|
|
|
|
| | |
|
2018-02-14 01:46:33 +00:00
|
|
|
| | nested `impl Trait` here
|
2018-02-08 23:40:27 +00:00
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/nested_impl_trait.rs:18:44
|
2018-02-08 23:40:27 +00:00
|
|
|
|
|
2018-02-24 23:59:34 +00:00
|
|
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
|
2018-02-08 23:40:27 +00:00
|
|
|
| ----------^^^^^^^^^^-
|
|
|
|
| | |
|
2018-02-14 01:46:33 +00:00
|
|
|
| | nested `impl Trait` here
|
2018-02-08 23:40:27 +00:00
|
|
|
| outer `impl Trait`
|
|
|
|
|
2022-02-18 03:18:42 +00:00
|
|
|
error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/nested_impl_trait.rs:9:32
|
2018-02-08 23:40:27 +00:00
|
|
|
|
|
2018-02-24 23:59:34 +00:00
|
|
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
|
2018-02-08 23:40:27 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-02-10 14:53:50 +00:00
|
|
|
error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
|
2022-02-16 15:48:46 +00:00
|
|
|
--> $DIR/nested_impl_trait.rs:5:46
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
|
|
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
|
2022-02-16 15:48:46 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
2022-03-26 21:26:02 +00:00
|
|
|
= help: the trait `Into<U>` is implemented for `T`
|
2022-08-15 20:31:37 +00:00
|
|
|
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
|
2022-02-14 16:10:22 +00:00
|
|
|
|
2022-02-10 14:53:50 +00:00
|
|
|
error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
|
2022-02-16 15:48:46 +00:00
|
|
|
--> $DIR/nested_impl_trait.rs:18:34
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
|
|
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
|
2022-02-16 15:48:46 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
2022-03-26 21:26:02 +00:00
|
|
|
= help: the trait `Into<U>` is implemented for `T`
|
2022-08-15 20:31:37 +00:00
|
|
|
= note: required for `impl Into<u32>` to implement `Into<impl Debug>`
|
2022-02-14 16:10:22 +00:00
|
|
|
|
2022-02-02 12:09:44 +00:00
|
|
|
error: aborting due to 7 previous errors
|
2018-02-08 23:40:27 +00: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`.
|