@@ -2,112 +2,67 @@ error[E0720]: cannot resolve opaque type
22 --> $DIR/recursive-impl-trait-type-indirect.rs:6:22
33 |
44LL | fn option(i: i32) -> impl Sized {
5- | ^^^^^^^^^^ recursive opaque type
6- LL |
7- LL | if i < 0 { None } else { Some((option(i - 1), i)) }
8- | ---- ------------------------ returning here with type `Option<(impl Sized, i32)>`
9- | |
10- | returning here with type `Option<(impl Sized, i32)>`
5+ | ^^^^^^^^^^
116
127error[E0720]: cannot resolve opaque type
138 --> $DIR/recursive-impl-trait-type-indirect.rs:11:15
149 |
1510LL | fn tuple() -> impl Sized {
16- | ^^^^^^^^^^ recursive opaque type
17- LL |
18- LL | (tuple(),)
19- | ---------- returning here with type `(impl Sized,)`
11+ | ^^^^^^^^^^
2012
2113error[E0720]: cannot resolve opaque type
2214 --> $DIR/recursive-impl-trait-type-indirect.rs:16:15
2315 |
2416LL | fn array() -> impl Sized {
25- | ^^^^^^^^^^ recursive opaque type
26- LL |
27- LL | [array()]
28- | --------- returning here with type `[impl Sized; 1]`
17+ | ^^^^^^^^^^
2918
3019error[E0720]: cannot resolve opaque type
3120 --> $DIR/recursive-impl-trait-type-indirect.rs:21:13
3221 |
3322LL | fn ptr() -> impl Sized {
34- | ^^^^^^^^^^ recursive opaque type
35- LL |
36- LL | &ptr() as *const _
37- | ------------------ returning here with type `*const impl Sized`
23+ | ^^^^^^^^^^
3824
3925error[E0720]: cannot resolve opaque type
4026 --> $DIR/recursive-impl-trait-type-indirect.rs:26:16
4127 |
4228LL | fn fn_ptr() -> impl Sized {
43- | ^^^^^^^^^^ recursive opaque type
44- LL |
45- LL | fn_ptr as fn() -> _
46- | ------------------- returning here with type `fn() -> impl Sized`
29+ | ^^^^^^^^^^
4730
4831error[E0720]: cannot resolve opaque type
4932 --> $DIR/recursive-impl-trait-type-indirect.rs:31:25
5033 |
51- LL | fn closure_capture() -> impl Sized {
52- | ^^^^^^^^^^ recursive opaque type
53- ...
54- LL | / move || {
55- LL | | x;
56- | | - closure captures itself here
57- LL | | }
58- | |_____- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:34:5: 34:12}`
34+ LL | fn closure_capture() -> impl Sized {
35+ | ^^^^^^^^^^
5936
6037error[E0720]: cannot resolve opaque type
6138 --> $DIR/recursive-impl-trait-type-indirect.rs:39:29
6239 |
63- LL | fn closure_ref_capture() -> impl Sized {
64- | ^^^^^^^^^^ recursive opaque type
65- ...
66- LL | / move || {
67- LL | | &x;
68- | | - closure captures itself here
69- LL | | }
70- | |_____- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:42:5: 42:12}`
40+ LL | fn closure_ref_capture() -> impl Sized {
41+ | ^^^^^^^^^^
7142
7243error[E0720]: cannot resolve opaque type
7344 --> $DIR/recursive-impl-trait-type-indirect.rs:47:21
7445 |
7546LL | fn closure_sig() -> impl Sized {
76- | ^^^^^^^^^^ recursive opaque type
77- LL |
78- LL | || closure_sig()
79- | ---------------- returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:49:5: 49:7}`
47+ | ^^^^^^^^^^
8048
8149error[E0720]: cannot resolve opaque type
8250 --> $DIR/recursive-impl-trait-type-indirect.rs:52:23
8351 |
8452LL | fn coroutine_sig() -> impl Sized {
85- | ^^^^^^^^^^ recursive opaque type
86- LL |
87- LL | || coroutine_sig()
88- | ------------------ returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:54:5: 54:7}`
53+ | ^^^^^^^^^^
8954
9055error[E0720]: cannot resolve opaque type
9156 --> $DIR/recursive-impl-trait-type-indirect.rs:57:27
9257 |
93- LL | fn coroutine_capture() -> impl Sized {
94- | ^^^^^^^^^^ recursive opaque type
95- ...
96- LL | / move || {
97- LL | | yield;
98- LL | | x;
99- | | - coroutine captures itself here
100- LL | | }
101- | |_____- returning here with type `{coroutine@$DIR/recursive-impl-trait-type-indirect.rs:62:5: 62:12}`
58+ LL | fn coroutine_capture() -> impl Sized {
59+ | ^^^^^^^^^^
10260
10361error[E0720]: cannot resolve opaque type
10462 --> $DIR/recursive-impl-trait-type-indirect.rs:68:35
10563 |
10664LL | fn substs_change<T: 'static>() -> impl Sized {
107- | ^^^^^^^^^^ recursive opaque type
108- LL |
109- LL | (substs_change::<&T>(),)
110- | ------------------------ returning here with type `(impl Sized,)`
65+ | ^^^^^^^^^^
11166
11267error[E0720]: cannot resolve opaque type
11368 --> $DIR/recursive-impl-trait-type-indirect.rs:78:26
0 commit comments