]> git.proxmox.com Git - rustc.git/blame - src/test/ui/impl-trait/nested_impl_trait.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / impl-trait / nested_impl_trait.stderr
CommitLineData
0531ce1d 1error[E0666]: nested `impl Trait` is not allowed
487cf647 2 --> $DIR/nested_impl_trait.rs:6: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
487cf647 11 --> $DIR/nested_impl_trait.rs:10: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
487cf647 20 --> $DIR/nested_impl_trait.rs:14: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
487cf647 29 --> $DIR/nested_impl_trait.rs:19: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
487cf647 38 --> $DIR/nested_impl_trait.rs:10:32
0531ce1d
XL
39 |
40LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
41 | ^^^^^^^^^^^^^^^^^^^^^
42
5e7ed085 43error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
487cf647 44 --> $DIR/nested_impl_trait.rs:6:46
5e7ed085
FG
45 |
46LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
47 | ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
48 |
04454e1e 49 = help: the trait `Into<U>` is implemented for `T`
f2b60f7d 50 = note: required for `impl Into<u32>` to implement `Into<impl Debug>`
5e7ed085
FG
51
52error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
487cf647 53 --> $DIR/nested_impl_trait.rs:19:34
5e7ed085
FG
54 |
55LL | fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
56 | ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
57 |
04454e1e 58 = help: the trait `Into<U>` is implemented for `T`
f2b60f7d 59 = note: required for `impl Into<u32>` to implement `Into<impl Debug>`
5e7ed085 60
487cf647 61error: aborting due to 7 previous errors
0531ce1d 62
5e7ed085
FG
63Some errors have detailed explanations: E0277, E0562, E0666.
64For more information about an error, try `rustc --explain E0277`.