@@ -15,22 +15,82 @@ LL | fn fut() -> impl Future<Output = i32> { 42 }
15
15
| ^^^^^^
16
16
17
17
error: this function can be simplified using the `async fn` syntax
18
- --> $DIR/manual_async_fn.rs:12:1
18
+ --> $DIR/manual_async_fn.rs:13:1
19
+ |
20
+ LL | fn fut2() ->impl Future<Output = i32> {
21
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22
+ |
23
+ help: make the function `async` and return the output of the future directly
24
+ |
25
+ LL | async fn fut2() -> i32 {
26
+ | ^^^^^^^^^^^^^^^^^^^^^^
27
+ help: move the body of the async block to the enclosing function
28
+ |
29
+ LL | fn fut2() ->impl Future<Output = i32> { 42 }
30
+ | ^^^^^^
31
+
32
+ error: this function can be simplified using the `async fn` syntax
33
+ --> $DIR/manual_async_fn.rs:18:1
34
+ |
35
+ LL | fn fut3()-> impl Future<Output = i32> {
36
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
+ |
38
+ help: make the function `async` and return the output of the future directly
39
+ |
40
+ LL | async fn fut3() -> i32 {
41
+ | ^^^^^^^^^^^^^^^^^^^^^^
42
+ help: move the body of the async block to the enclosing function
43
+ |
44
+ LL | fn fut3()-> impl Future<Output = i32> { 42 }
45
+ | ^^^^^^
46
+
47
+ error: this function can be simplified using the `async fn` syntax
48
+ --> $DIR/manual_async_fn.rs:22:1
19
49
|
20
50
LL | fn empty_fut() -> impl Future<Output = ()> {
21
51
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22
52
|
23
53
help: make the function `async` and remove the return type
24
54
|
25
- LL | async fn empty_fut() {
55
+ LL | async fn empty_fut() {
26
56
| ^^^^^^^^^^^^^^^^^^^^
27
57
help: move the body of the async block to the enclosing function
28
58
|
29
59
LL | fn empty_fut() -> impl Future<Output = ()> {}
30
60
| ^^
31
61
32
62
error: this function can be simplified using the `async fn` syntax
33
- --> $DIR/manual_async_fn.rs:16:1
63
+ --> $DIR/manual_async_fn.rs:27:1
64
+ |
65
+ LL | fn empty_fut2() ->impl Future<Output = ()> {
66
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67
+ |
68
+ help: make the function `async` and remove the return type
69
+ |
70
+ LL | async fn empty_fut2() {
71
+ | ^^^^^^^^^^^^^^^^^^^^^
72
+ help: move the body of the async block to the enclosing function
73
+ |
74
+ LL | fn empty_fut2() ->impl Future<Output = ()> {}
75
+ | ^^
76
+
77
+ error: this function can be simplified using the `async fn` syntax
78
+ --> $DIR/manual_async_fn.rs:32:1
79
+ |
80
+ LL | fn empty_fut3()-> impl Future<Output = ()> {
81
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
+ |
83
+ help: make the function `async` and remove the return type
84
+ |
85
+ LL | async fn empty_fut3() {
86
+ | ^^^^^^^^^^^^^^^^^^^^^
87
+ help: move the body of the async block to the enclosing function
88
+ |
89
+ LL | fn empty_fut3()-> impl Future<Output = ()> {}
90
+ | ^^
91
+
92
+ error: this function can be simplified using the `async fn` syntax
93
+ --> $DIR/manual_async_fn.rs:36:1
34
94
|
35
95
LL | fn core_fut() -> impl core::future::Future<Output = i32> {
36
96
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -45,7 +105,7 @@ LL | fn core_fut() -> impl core::future::Future<Output = i32> { 42 }
45
105
| ^^^^^^
46
106
47
107
error: this function can be simplified using the `async fn` syntax
48
- --> $DIR/manual_async_fn.rs:38 :5
108
+ --> $DIR/manual_async_fn.rs:58 :5
49
109
|
50
110
LL | fn inh_fut() -> impl Future<Output = i32> {
51
111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -65,7 +125,7 @@ LL | let c = 21;
65
125
...
66
126
67
127
error: this function can be simplified using the `async fn` syntax
68
- --> $DIR/manual_async_fn.rs:73 :1
128
+ --> $DIR/manual_async_fn.rs:93 :1
69
129
|
70
130
LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
71
131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -80,7 +140,7 @@ LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ { 42 }
80
140
| ^^^^^^
81
141
82
142
error: this function can be simplified using the `async fn` syntax
83
- --> $DIR/manual_async_fn.rs:82 :1
143
+ --> $DIR/manual_async_fn.rs:102 :1
84
144
|
85
145
LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
86
146
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -94,5 +154,5 @@ help: move the body of the async block to the enclosing function
94
154
LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b { 42 }
95
155
| ^^^^^^
96
156
97
- error: aborting due to 6 previous errors
157
+ error: aborting due to 10 previous errors
98
158
0 commit comments