2018-02-08 17:40:27 -06:00
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2018-03-21 20:32:44 -05:00
|
|
|
--> $DIR/nested_impl_trait.rs:14:56
|
2018-02-08 17:40:27 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
|
2018-02-08 17:40:27 -06:00
|
|
|
| ----------^^^^^^^^^^-
|
|
|
|
| | |
|
2018-02-13 19:46:33 -06:00
|
|
|
| | nested `impl Trait` here
|
2018-02-08 17:40:27 -06:00
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2018-03-21 20:32:44 -05:00
|
|
|
--> $DIR/nested_impl_trait.rs:17:42
|
2018-02-08 17:40:27 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
|
2018-02-08 17:40:27 -06:00
|
|
|
| ----------^^^^^^^^^^-
|
|
|
|
| | |
|
2018-02-13 19:46:33 -06:00
|
|
|
| | nested `impl Trait` here
|
2018-02-08 17:40:27 -06:00
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2018-03-21 20:32:44 -05:00
|
|
|
--> $DIR/nested_impl_trait.rs:21:37
|
2018-02-08 17:40:27 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
|
2018-02-08 17:40:27 -06:00
|
|
|
| ----------^^^^^^^^^^-
|
|
|
|
| | |
|
2018-02-13 19:46:33 -06:00
|
|
|
| | nested `impl Trait` here
|
2018-02-08 17:40:27 -06:00
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0666]: nested `impl Trait` is not allowed
|
2018-03-21 20:32:44 -05:00
|
|
|
--> $DIR/nested_impl_trait.rs:26:44
|
2018-02-08 17:40:27 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
|
2018-02-08 17:40:27 -06:00
|
|
|
| ----------^^^^^^^^^^-
|
|
|
|
| | |
|
2018-02-13 19:46:33 -06:00
|
|
|
| | nested `impl Trait` here
|
2018-02-08 17:40:27 -06:00
|
|
|
| outer `impl Trait`
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2018-03-21 20:32:44 -05:00
|
|
|
--> $DIR/nested_impl_trait.rs:17:32
|
2018-02-08 17:40:27 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
|
2018-02-08 17:40:27 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
|
2018-03-21 20:32:44 -05:00
|
|
|
--> $DIR/nested_impl_trait.rs:34:42
|
2018-02-08 17:40:27 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
|
2018-02-08 17:40:27 -06:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|
2018-03-03 08:59:40 -06:00
|
|
|
Some errors occurred: E0562, E0666.
|
|
|
|
For more information about an error, try `rustc --explain E0562`.
|