1 error[E0720]: cannot resolve opaque type
2 --> $DIR/recursive-impl-trait-type-indirect.rs:7:22
4 LL | fn option(i: i32) -> impl Sized {
5 | ^^^^^^^^^^ recursive opaque type
7 LL | if i < 0 { None } else { Some((option(i - 1), i)) }
8 | ---- ------------------------ returning here with type `Option<(impl Sized, i32)>`
10 | returning here with type `Option<(impl Sized, i32)>`
12 error[E0720]: cannot resolve opaque type
13 --> $DIR/recursive-impl-trait-type-indirect.rs:12:15
15 LL | fn tuple() -> impl Sized {
16 | ^^^^^^^^^^ recursive opaque type
19 | ---------- returning here with type `(impl Sized,)`
21 error[E0720]: cannot resolve opaque type
22 --> $DIR/recursive-impl-trait-type-indirect.rs:17:15
24 LL | fn array() -> impl Sized {
25 | ^^^^^^^^^^ recursive opaque type
28 | --------- returning here with type `[impl Sized; 1]`
30 error[E0720]: cannot resolve opaque type
31 --> $DIR/recursive-impl-trait-type-indirect.rs:22:13
33 LL | fn ptr() -> impl Sized {
34 | ^^^^^^^^^^ recursive opaque type
36 LL | &ptr() as *const _
37 | ------------------ returning here with type `*const impl Sized`
39 error[E0720]: cannot resolve opaque type
40 --> $DIR/recursive-impl-trait-type-indirect.rs:27:16
42 LL | fn fn_ptr() -> impl Sized {
43 | ^^^^^^^^^^ recursive opaque type
45 LL | fn_ptr as fn() -> _
46 | ------------------- returning here with type `fn() -> impl Sized`
48 error[E0720]: cannot resolve opaque type
49 --> $DIR/recursive-impl-trait-type-indirect.rs:32:25
51 LL | fn closure_capture() -> impl Sized {
52 | ^^^^^^^^^^ recursive opaque type
57 | |_____- returning here with type `[closure@$DIR/recursive-impl-trait-type-indirect.rs:35:5: 35:12]`
59 error[E0720]: cannot resolve opaque type
60 --> $DIR/recursive-impl-trait-type-indirect.rs:40:29
62 LL | fn closure_ref_capture() -> impl Sized {
63 | ^^^^^^^^^^ recursive opaque type
68 | |_____- returning here with type `[closure@$DIR/recursive-impl-trait-type-indirect.rs:43:5: 43:12]`
70 error[E0720]: cannot resolve opaque type
71 --> $DIR/recursive-impl-trait-type-indirect.rs:48:21
73 LL | fn closure_sig() -> impl Sized {
74 | ^^^^^^^^^^ recursive opaque type
77 | ---------------- returning here with type `[closure@$DIR/recursive-impl-trait-type-indirect.rs:50:5: 50:7]`
79 error[E0720]: cannot resolve opaque type
80 --> $DIR/recursive-impl-trait-type-indirect.rs:53:23
82 LL | fn generator_sig() -> impl Sized {
83 | ^^^^^^^^^^ recursive opaque type
85 LL | || generator_sig()
86 | ------------------ returning here with type `[closure@$DIR/recursive-impl-trait-type-indirect.rs:55:5: 55:7]`
88 error[E0720]: cannot resolve opaque type
89 --> $DIR/recursive-impl-trait-type-indirect.rs:58:27
91 LL | fn generator_capture() -> impl Sized {
92 | ^^^^^^^^^^ recursive opaque type
98 | |_____- returning here with type `[generator@$DIR/recursive-impl-trait-type-indirect.rs:61:5: 61:12]`
100 error[E0720]: cannot resolve opaque type
101 --> $DIR/recursive-impl-trait-type-indirect.rs:67:35
103 LL | fn substs_change<T: 'static>() -> impl Sized {
104 | ^^^^^^^^^^ recursive opaque type
106 LL | (substs_change::<&T>(),)
107 | ------------------------ returning here with type `(impl Sized,)`
109 error[E0720]: cannot resolve opaque type
110 --> $DIR/recursive-impl-trait-type-indirect.rs:72:24
112 LL | fn generator_hold() -> impl Sized {
113 | ^^^^^^^^^^ recursive opaque type
116 LL | | let x = generator_hold();
120 | |_____- returning here with type `[generator@$DIR/recursive-impl-trait-type-indirect.rs:74:5: 74:12]`
122 error[E0720]: cannot resolve opaque type
123 --> $DIR/recursive-impl-trait-type-indirect.rs:86:26
125 LL | fn mutual_recursion() -> impl Sync {
126 | ^^^^^^^^^ recursive opaque type
128 LL | mutual_recursion_b()
129 | -------------------- returning here with type `impl Sized`
131 LL | fn mutual_recursion_b() -> impl Sized {
132 | ---------- returning this opaque type `impl Sized`
134 error[E0720]: cannot resolve opaque type
135 --> $DIR/recursive-impl-trait-type-indirect.rs:91:28
137 LL | fn mutual_recursion() -> impl Sync {
138 | --------- returning this opaque type `impl Sync`
140 LL | fn mutual_recursion_b() -> impl Sized {
141 | ^^^^^^^^^^ recursive opaque type
143 LL | mutual_recursion()
144 | ------------------ returning here with type `impl Sync`
146 error: aborting due to 14 previous errors
148 For more information about this error, try `rustc --explain E0720`.