summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/unnecessary-await.stderr
blob: 9a2a035b2dd0882017e1947a9053e3a2d06ab168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
error[E0277]: `()` is not a future
  --> $DIR/unnecessary-await.rs:9:11
   |
LL |     boo().await;
   |     ----- ^^^^^ `()` is not a future
   |     |
   |     this call returns `()`
   |
   = help: the trait `Future` is not implemented for `()`
   = note: () must be a future or must implement `IntoFuture` to be awaited
   = note: required for `()` to implement `IntoFuture`
help: remove the `.await`
   |
LL -     boo().await;
LL +     boo();
   |
help: alternatively, consider making `fn boo` asynchronous
   |
LL | async fn boo() {}
   | +++++

error[E0277]: `()` is not a future
  --> $DIR/unnecessary-await.rs:28:10
   |
LL |     e!().await;
   |         -^^^^^
   |         ||
   |         |`()` is not a future
   |         help: remove the `.await`
   |
   = help: the trait `Future` is not implemented for `()`
   = note: () must be a future or must implement `IntoFuture` to be awaited
   = note: required for `()` to implement `IntoFuture`

error[E0277]: `()` is not a future
  --> $DIR/unnecessary-await.rs:22:15
   |
LL |         $expr.await
   |               ^^^^^
   |               |
   |               `()` is not a future
   |               remove the `.await`
...
LL |     f!(());
   |     ------ in this macro invocation
   |
   = help: the trait `Future` is not implemented for `()`
   = note: () must be a future or must implement `IntoFuture` to be awaited
   = note: required for `()` to implement `IntoFuture`
   = note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0277`.