fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.8 KiB75 linesraw
1error: this async expression only awaits a single future
2  --> $DIR/redundant_async_block.rs:13:13
3   |
4LL |     let x = async { f.await };
5   |             ^^^^^^^^^^^^^^^^^ help: you can reduce it to: `f`
6   |
7   = note: `-D clippy::redundant-async-block` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::redundant_async_block)]`
9
10error: this async expression only awaits a single future
11  --> $DIR/redundant_async_block.rs:20:16
12   |
13LL |     let fut2 = async { fut1.await };
14   |                ^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut1`
15
16error: this async expression only awaits a single future
17  --> $DIR/redundant_async_block.rs:24:16
18   |
19LL |     let fut2 = async move { fut1.await };
20   |                ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut1`
21
22error: this async expression only awaits a single future
23  --> $DIR/redundant_async_block.rs:27:15
24   |
25LL |     let fut = async { async { 42 }.await };
26   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { 42 }`
27
28error: this async expression only awaits a single future
29  --> $DIR/redundant_async_block.rs:43:5
30   |
31LL |     async move { fut.await }
32   |     ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut`
33
34error: this async expression only awaits a single future
35  --> $DIR/redundant_async_block.rs:56:5
36   |
37LL |     async move { fut.await }
38   |     ^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `fut`
39
40error: this async expression only awaits a single future
41  --> $DIR/redundant_async_block.rs:61:5
42   |
43LL |     async { f.await }
44   |     ^^^^^^^^^^^^^^^^^ help: you can reduce it to: `f`
45
46error: this async expression only awaits a single future
47  --> $DIR/redundant_async_block.rs:84:5
48   |
49LL |     async { async { f().await + 1 }.await }
50   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { f().await + 1 }`
51
52error: this async expression only awaits a single future
53  --> $DIR/redundant_async_block.rs:147:13
54   |
55LL |             async { async { 42 }.await }
56   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { 42 }`
57...
58LL |     mac!()
59   |     ------ in this macro invocation
60   |
61   = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
62
63error: this async expression only awaits a single future
64  --> $DIR/redundant_async_block.rs:167:13
65   |
66LL |             async { async { $e }.await }
67   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `async { $e }`
68...
69LL |     mac!(42)
70   |     -------- in this macro invocation
71   |
72   = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
73
74error: aborting due to 10 previous errors
75