]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/nested_impl_trait.stderr
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / impl-trait / nested_impl_trait.stderr
CommitLineData
0531ce1d 1error[E0666]: nested `impl Trait` is not allowed
0731742a 2 --> $DIR/nested_impl_trait.rs:5:56
0531ce1d
XL
3 |
4LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
5 | ----------^^^^^^^^^^-
6 | | |
7 | | nested `impl Trait` here
8 | outer `impl Trait`
9
10error[E0666]: nested `impl Trait` is not allowed
0731742a 11 --> $DIR/nested_impl_trait.rs:8:42
0531ce1d
XL
12 |
13LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
14 | ----------^^^^^^^^^^-
15 | | |
16 | | nested `impl Trait` here
17 | outer `impl Trait`
18
19error[E0666]: nested `impl Trait` is not allowed
0731742a 20 --> $DIR/nested_impl_trait.rs:12:37
0531ce1d
XL
21 |
22LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
23 | ----------^^^^^^^^^^-
24 | | |
25 | | nested `impl Trait` here
26 | outer `impl Trait`
27
28error[E0666]: nested `impl Trait` is not allowed
0731742a 29 --> $DIR/nested_impl_trait.rs:17:44
0531ce1d
XL
30 |
31LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
32 | ----------^^^^^^^^^^-
33 | | |
34 | | nested `impl Trait` here
35 | outer `impl Trait`
36
5099ac24 37error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
0731742a 38 --> $DIR/nested_impl_trait.rs:8:32
0531ce1d
XL
39 |
40LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
41 | ^^^^^^^^^^^^^^^^^^^^^
42
5099ac24 43error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
0731742a 44 --> $DIR/nested_impl_trait.rs:25:42
0531ce1d
XL
45 |
46LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
47 | ^^^^^^^^^^^^^^
48
49error: aborting due to 6 previous errors
50
e74abb32
XL
51Some errors have detailed explanations: E0562, E0666.
52For more information about an error, try `rustc --explain E0562`.