1 error: this function can be simplified using async syntax
2 --> $DIR/manual_async_fn.rs:8:1
4 LL | fn fut() -> impl Future<Output = i32> {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::manual-async-fn` implied by `-D warnings`
8 help: make the function `async` and return the output of the future directly
10 LL | async fn fut() -> i32 {
11 | ^^^^^^^^^^^^^^^^^^^^^
12 help: move the body of the async block to the enclosing function
14 LL | fn fut() -> impl Future<Output = i32> { 42 }
17 error: this function can be simplified using async syntax
18 --> $DIR/manual_async_fn.rs:12:1
20 LL | fn empty_fut() -> impl Future<Output = ()> {
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 help: make the function `async` and remove the return type
25 LL | async fn empty_fut() {
26 | ^^^^^^^^^^^^^^^^^^^^
27 help: move the body of the async block to the enclosing function
29 LL | fn empty_fut() -> impl Future<Output = ()> {}
32 error: this function can be simplified using async syntax
33 --> $DIR/manual_async_fn.rs:16:1
35 LL | fn core_fut() -> impl core::future::Future<Output = i32> {
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38 help: make the function `async` and return the output of the future directly
40 LL | async fn core_fut() -> i32 {
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
42 help: move the body of the async block to the enclosing function
44 LL | fn core_fut() -> impl core::future::Future<Output = i32> { 42 }
47 error: this function can be simplified using async syntax
48 --> $DIR/manual_async_fn.rs:38:5
50 LL | fn inh_fut() -> impl Future<Output = i32> {
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53 help: make the function `async` and return the output of the future directly
55 LL | async fn inh_fut() -> i32 {
56 | ^^^^^^^^^^^^^^^^^^^^^^^^^
57 help: move the body of the async block to the enclosing function
59 LL | fn inh_fut() -> impl Future<Output = i32> { 42 }
62 error: this function can be simplified using async syntax
63 --> $DIR/manual_async_fn.rs:42:5
65 LL | fn meth_fut(&self) -> impl Future<Output = i32> {
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68 help: make the function `async` and return the output of the future directly
70 LL | async fn meth_fut(&self) -> i32 {
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72 help: move the body of the async block to the enclosing function
74 LL | fn meth_fut(&self) -> impl Future<Output = i32> { 42 }
77 error: this function can be simplified using async syntax
78 --> $DIR/manual_async_fn.rs:46:5
80 LL | fn empty_fut(&self) -> impl Future<Output = ()> {
81 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83 help: make the function `async` and remove the return type
85 LL | async fn empty_fut(&self) {
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^
87 help: move the body of the async block to the enclosing function
89 LL | fn empty_fut(&self) -> impl Future<Output = ()> {}
92 error: aborting due to 6 previous errors