]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/recursive-impl-trait-type.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / impl-trait / recursive-impl-trait-type.stderr
1 error[E0720]: opaque type expands to a recursive type
2   --> $DIR/recursive-impl-trait-type.rs:6:22
3    |
4 LL | fn option(i: i32) -> impl Sized { //~ ERROR
5    |                      ^^^^^^^^^^ expands to self-referential type
6    |
7    = note: expanded type is `std::option::Option<(impl Sized, i32)>`
8
9 error[E0720]: opaque type expands to a recursive type
10   --> $DIR/recursive-impl-trait-type.rs:14:15
11    |
12 LL | fn tuple() -> impl Sized { //~ ERROR
13    |               ^^^^^^^^^^ expands to self-referential type
14    |
15    = note: expanded type is `(impl Sized,)`
16
17 error[E0720]: opaque type expands to a recursive type
18   --> $DIR/recursive-impl-trait-type.rs:18:15
19    |
20 LL | fn array() -> impl Sized { //~ ERROR
21    |               ^^^^^^^^^^ expands to self-referential type
22    |
23    = note: expanded type is `[impl Sized; 1]`
24
25 error[E0720]: opaque type expands to a recursive type
26   --> $DIR/recursive-impl-trait-type.rs:22:13
27    |
28 LL | fn ptr() -> impl Sized { //~ ERROR
29    |             ^^^^^^^^^^ expands to self-referential type
30    |
31    = note: expanded type is `*const impl Sized`
32
33 error[E0720]: opaque type expands to a recursive type
34   --> $DIR/recursive-impl-trait-type.rs:26:16
35    |
36 LL | fn fn_ptr() -> impl Sized { //~ ERROR
37    |                ^^^^^^^^^^ expands to self-referential type
38    |
39    = note: expanded type is `fn() -> impl Sized`
40
41 error[E0720]: opaque type expands to a recursive type
42   --> $DIR/recursive-impl-trait-type.rs:30:25
43    |
44 LL | fn closure_capture() -> impl Sized { //~ ERROR
45    |                         ^^^^^^^^^^ expands to self-referential type
46    |
47    = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:32:5: 32:19 x:impl Sized]`
48
49 error[E0720]: opaque type expands to a recursive type
50   --> $DIR/recursive-impl-trait-type.rs:35:29
51    |
52 LL | fn closure_ref_capture() -> impl Sized { //~ ERROR
53    |                             ^^^^^^^^^^ expands to self-referential type
54    |
55    = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:37:5: 37:20 x:impl Sized]`
56
57 error[E0720]: opaque type expands to a recursive type
58   --> $DIR/recursive-impl-trait-type.rs:40:21
59    |
60 LL | fn closure_sig() -> impl Sized { //~ ERROR
61    |                     ^^^^^^^^^^ expands to self-referential type
62    |
63    = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:41:5: 41:21]`
64
65 error[E0720]: opaque type expands to a recursive type
66   --> $DIR/recursive-impl-trait-type.rs:44:23
67    |
68 LL | fn generator_sig() -> impl Sized { //~ ERROR
69    |                       ^^^^^^^^^^ expands to self-referential type
70    |
71    = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:45:5: 45:23]`
72
73 error[E0720]: opaque type expands to a recursive type
74   --> $DIR/recursive-impl-trait-type.rs:48:27
75    |
76 LL | fn generator_capture() -> impl Sized { //~ ERROR
77    |                           ^^^^^^^^^^ expands to self-referential type
78    |
79    = note: expanded type is `[generator@$DIR/recursive-impl-trait-type.rs:50:5: 50:26 x:impl Sized {()}]`
80
81 error[E0720]: opaque type expands to a recursive type
82   --> $DIR/recursive-impl-trait-type.rs:53:26
83    |
84 LL | fn substs_change<T>() -> impl Sized { //~ ERROR
85    |                          ^^^^^^^^^^ expands to self-referential type
86    |
87    = note: expanded type is `(impl Sized,)`
88
89 error[E0720]: opaque type expands to a recursive type
90   --> $DIR/recursive-impl-trait-type.rs:57:24
91    |
92 LL | fn generator_hold() -> impl Sized { //~ ERROR
93    |                        ^^^^^^^^^^ expands to self-referential type
94    |
95    = note: expanded type is `[generator@$DIR/recursive-impl-trait-type.rs:58:5: 62:6 {impl Sized, ()}]`
96
97 error[E0720]: opaque type expands to a recursive type
98   --> $DIR/recursive-impl-trait-type.rs:65:40
99    |
100 LL | async fn recursive_async_function() -> () { //~ ERROR
101    |                                        ^^ expands to self-referential type
102    |
103    = note: expanded type is `std::future::GenFuture<[static generator@$DIR/recursive-impl-trait-type.rs:65:43: 67:2 {impl std::future::Future, ()}]>`
104
105 error[E0720]: opaque type expands to a recursive type
106   --> $DIR/recursive-impl-trait-type.rs:73:26
107    |
108 LL | fn mutual_recursion() -> impl Sync { //~ ERROR
109    |                          ^^^^^^^^^ expands to self-referential type
110    |
111    = note: type resolves to itself
112
113 error[E0720]: opaque type expands to a recursive type
114   --> $DIR/recursive-impl-trait-type.rs:77:28
115    |
116 LL | fn mutual_recursion_b() -> impl Sized { //~ ERROR
117    |                            ^^^^^^^^^^ expands to self-referential type
118    |
119    = note: type resolves to itself
120
121 error: aborting due to 15 previous errors
122
123 For more information about this error, try `rustc --explain E0720`.