|
| 1 | +error: closure returning async block can be made into an async closure |
| 2 | + --> $DIR/lint-closure-returning-async-block.rs:7:13 |
| 3 | + | |
| 4 | +LL | let x = || async {}; |
| 5 | + | ^^ ----- this async block can be removed, and the closure can be turned into an async closure |
| 6 | + | |
| 7 | +note: the lint level is defined here |
| 8 | + --> $DIR/lint-closure-returning-async-block.rs:4:9 |
| 9 | + | |
| 10 | +LL | #![deny(closure_returning_async_block)] |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 | +help: turn this into an async closure |
| 13 | + | |
| 14 | +LL - let x = || async {}; |
| 15 | +LL + let x = async || {}; |
| 16 | + | |
| 17 | + |
| 18 | +error: closure returning async block can be made into an async closure |
| 19 | + --> $DIR/lint-closure-returning-async-block.rs:10:13 |
| 20 | + | |
| 21 | +LL | let x = || async move {}; |
| 22 | + | ^^ ---------- this async block can be removed, and the closure can be turned into an async closure |
| 23 | + | |
| 24 | +help: turn this into an async closure |
| 25 | + | |
| 26 | +LL - let x = || async move {}; |
| 27 | +LL + let x = async || {}; |
| 28 | + | |
| 29 | + |
| 30 | +error: closure returning async block can be made into an async closure |
| 31 | + --> $DIR/lint-closure-returning-async-block.rs:13:13 |
| 32 | + | |
| 33 | +LL | let x = move || async move {}; |
| 34 | + | ^^^^^^^ ---------- this async block can be removed, and the closure can be turned into an async closure |
| 35 | + | |
| 36 | +help: turn this into an async closure |
| 37 | + | |
| 38 | +LL - let x = move || async move {}; |
| 39 | +LL + let x = async move || {}; |
| 40 | + | |
| 41 | + |
| 42 | +error: closure returning async block can be made into an async closure |
| 43 | + --> $DIR/lint-closure-returning-async-block.rs:16:13 |
| 44 | + | |
| 45 | +LL | let x = move || async {}; |
| 46 | + | ^^^^^^^ ----- this async block can be removed, and the closure can be turned into an async closure |
| 47 | + | |
| 48 | +help: turn this into an async closure |
| 49 | + | |
| 50 | +LL - let x = move || async {}; |
| 51 | +LL + let x = async move || {}; |
| 52 | + | |
| 53 | + |
| 54 | +error: closure returning async block can be made into an async closure |
| 55 | + --> $DIR/lint-closure-returning-async-block.rs:19:13 |
| 56 | + | |
| 57 | +LL | let x = || {{ async {} }}; |
| 58 | + | ^^ ----- this async block can be removed, and the closure can be turned into an async closure |
| 59 | + | |
| 60 | +help: turn this into an async closure |
| 61 | + | |
| 62 | +LL - let x = || {{ async {} }}; |
| 63 | +LL + let x = async || {{ {} }}; |
| 64 | + | |
| 65 | + |
| 66 | +error: aborting due to 5 previous errors |
| 67 | + |
0 commit comments