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 { //~ ERROR
5 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
13 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
21 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
29 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
37 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
45 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
53 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
61 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
69 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
77 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
85 | ^^^^^^^^^^ expands to self-referential 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 { //~ ERROR
93 | ^^^^^^^^^^ expands to self-referential 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:65:40
100 LL | async fn recursive_async_function() -> () { //~ ERROR
101 | ^^ expands to self-referential type
103 = note: expanded type is `std::future::GenFuture<[static generator@$DIR/recursive-impl-trait-type.rs:65:43: 67:2 {impl std::future::Future, ()}]>`
105 error[E0720]: opaque type expands to a recursive type
106 --> $DIR/recursive-impl-trait-type.rs:73:26
108 LL | fn mutual_recursion() -> impl Sync { //~ ERROR
109 | ^^^^^^^^^ expands to self-referential type
111 = note: type resolves to itself
113 error[E0720]: opaque type expands to a recursive type
114 --> $DIR/recursive-impl-trait-type.rs:77:28
116 LL | fn mutual_recursion_b() -> impl Sized { //~ ERROR
117 | ^^^^^^^^^^ expands to self-referential type
119 = note: type resolves to itself
121 error: aborting due to 15 previous errors
123 For more information about this error, try `rustc --explain E0720`.