1 error[E0720]: opaque type expands to a recursive type
2 --> $DIR/recursive-impl-trait-type.rs:6:22
4 LL | fn option(i: i32) -> impl Sized {
5 | ^^^^^^^^^^ expands to a recursive type
7 = note: expanded type is `std::option::Option<(impl Sized, i32)>`
9 error[E0720]: opaque type expands to a recursive type
10 --> $DIR/recursive-impl-trait-type.rs:14:15
12 LL | fn tuple() -> impl Sized {
13 | ^^^^^^^^^^ expands to a recursive type
15 = note: expanded type is `(impl Sized,)`
17 error[E0720]: opaque type expands to a recursive type
18 --> $DIR/recursive-impl-trait-type.rs:18:15
20 LL | fn array() -> impl Sized {
21 | ^^^^^^^^^^ expands to a recursive type
23 = note: expanded type is `[impl Sized; 1]`
25 error[E0720]: opaque type expands to a recursive type
26 --> $DIR/recursive-impl-trait-type.rs:22:13
28 LL | fn ptr() -> impl Sized {
29 | ^^^^^^^^^^ expands to a recursive type
31 = note: expanded type is `*const impl Sized`
33 error[E0720]: opaque type expands to a recursive type
34 --> $DIR/recursive-impl-trait-type.rs:26:16
36 LL | fn fn_ptr() -> impl Sized {
37 | ^^^^^^^^^^ expands to a recursive type
39 = note: expanded type is `fn() -> impl Sized`
41 error[E0720]: opaque type expands to a recursive type
42 --> $DIR/recursive-impl-trait-type.rs:30:25
44 LL | fn closure_capture() -> impl Sized {
45 | ^^^^^^^^^^ expands to a recursive type
47 = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:32:5: 32:19 x:impl Sized]`
49 error[E0720]: opaque type expands to a recursive type
50 --> $DIR/recursive-impl-trait-type.rs:35:29
52 LL | fn closure_ref_capture() -> impl Sized {
53 | ^^^^^^^^^^ expands to a recursive type
55 = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:37:5: 37:20 x:impl Sized]`
57 error[E0720]: opaque type expands to a recursive type
58 --> $DIR/recursive-impl-trait-type.rs:40:21
60 LL | fn closure_sig() -> impl Sized {
61 | ^^^^^^^^^^ expands to a recursive type
63 = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:41:5: 41:21]`
65 error[E0720]: opaque type expands to a recursive type
66 --> $DIR/recursive-impl-trait-type.rs:44:23
68 LL | fn generator_sig() -> impl Sized {
69 | ^^^^^^^^^^ expands to a recursive type
71 = note: expanded type is `[closure@$DIR/recursive-impl-trait-type.rs:45:5: 45:23]`
73 error[E0720]: opaque type expands to a recursive type
74 --> $DIR/recursive-impl-trait-type.rs:48:27
76 LL | fn generator_capture() -> impl Sized {
77 | ^^^^^^^^^^ expands to a recursive type
79 = note: expanded type is `[generator@$DIR/recursive-impl-trait-type.rs:50:5: 50:26 x:impl Sized {()}]`
81 error[E0720]: opaque type expands to a recursive type
82 --> $DIR/recursive-impl-trait-type.rs:53:26
84 LL | fn substs_change<T>() -> impl Sized {
85 | ^^^^^^^^^^ expands to a recursive type
87 = note: expanded type is `(impl Sized,)`
89 error[E0720]: opaque type expands to a recursive type
90 --> $DIR/recursive-impl-trait-type.rs:57:24
92 LL | fn generator_hold() -> impl Sized {
93 | ^^^^^^^^^^ expands to a recursive type
95 = note: expanded type is `[generator@$DIR/recursive-impl-trait-type.rs:58:5: 62:6 {impl Sized, ()}]`
97 error[E0720]: opaque type expands to a recursive type
98 --> $DIR/recursive-impl-trait-type.rs:69:26
100 LL | fn mutual_recursion() -> impl Sync {
101 | ^^^^^^^^^ expands to a recursive type
103 = note: type resolves to itself
105 error[E0720]: opaque type expands to a recursive type
106 --> $DIR/recursive-impl-trait-type.rs:73:28
108 LL | fn mutual_recursion_b() -> impl Sized {
109 | ^^^^^^^^^^ expands to a recursive type
111 = note: type resolves to itself
113 error: aborting due to 14 previous errors
115 For more information about this error, try `rustc --explain E0720`.