1 error: this function can be simplified using the `async fn` 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 the `async fn` 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 the `async fn` 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 the `async fn` 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> {
60 LL | // NOTE: this code is here just to check that the indentation is correct in the suggested fix
67 error: this function can be simplified using the `async fn` syntax
68 --> $DIR/manual_async_fn.rs:73:1
70 LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
73 help: make the function `async` and return the output of the future directly
75 LL | async fn elided(_: &i32) -> i32 {
76 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77 help: move the body of the async block to the enclosing function
79 LL | fn elided(_: &i32) -> impl Future<Output = i32> + '_ { 42 }
82 error: this function can be simplified using the `async fn` syntax
83 --> $DIR/manual_async_fn.rs:82:1
85 LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88 help: make the function `async` and return the output of the future directly
90 LL | async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 {
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92 help: move the body of the async block to the enclosing function
94 LL | fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b { 42 }
97 error: aborting due to 6 previous errors