]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/recursive-impl-trait-type.stderr
Self-referencial type renamed to recursive type.
[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 {
5    |                      ^^^^^^^^^^ expands to a recursive 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 {
13    |               ^^^^^^^^^^ expands to a recursive 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 {
21    |               ^^^^^^^^^^ expands to a recursive 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 {
29    |             ^^^^^^^^^^ expands to a recursive 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 {
37    |                ^^^^^^^^^^ expands to a recursive 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 {
45    |                         ^^^^^^^^^^ expands to a recursive 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 {
53    |                             ^^^^^^^^^^ expands to a recursive 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 {
61    |                     ^^^^^^^^^^ expands to a recursive 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 {
69    |                       ^^^^^^^^^^ expands to a recursive 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 {
77    |                           ^^^^^^^^^^ expands to a recursive 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 {
85    |                          ^^^^^^^^^^ expands to a recursive 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 {
93    |                        ^^^^^^^^^^ expands to a recursive 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:69:26
99    |
100 LL | fn mutual_recursion() -> impl Sync {
101    |                          ^^^^^^^^^ expands to a recursive type
102    |
103    = note: type resolves to itself
104
105 error[E0720]: opaque type expands to a recursive type
106   --> $DIR/recursive-impl-trait-type.rs:73:28
107    |
108 LL | fn mutual_recursion_b() -> impl Sized {
109    |                            ^^^^^^^^^^ expands to a recursive type
110    |
111    = note: type resolves to itself
112
113 error: aborting due to 14 previous errors
114
115 For more information about this error, try `rustc --explain E0720`.