• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error[E0277]: the `?` operator can only be applied to values that implement `Try`
2  --> $DIR/issue-61076.rs:42:5
3   |
4LL |     foo()?;
5   |     ^^^^^^ the `?` operator cannot be applied to type `impl Future<Output = Result<(), ()>>`
6   |
7   = help: the trait `Try` is not implemented for `impl Future<Output = Result<(), ()>>`
8help: consider `await`ing on the `Future`
9   |
10LL |     foo().await?;
11   |          ++++++
12
13error[E0277]: the `?` operator can only be applied to values that implement `Try`
14  --> $DIR/issue-61076.rs:62:5
15   |
16LL |     t?;
17   |     ^^ the `?` operator cannot be applied to type `T`
18   |
19   = help: the trait `Try` is not implemented for `T`
20help: consider `await`ing on the `Future`
21   |
22LL |     t.await?;
23   |      ++++++
24
25error[E0609]: no field `0` on type `impl Future<Output = Tuple>`
26  --> $DIR/issue-61076.rs:71:26
27   |
28LL |     let _: i32 = tuple().0;
29   |                          ^ field not available in `impl Future`, but it is available in its `Output`
30   |
31help: consider `await`ing on the `Future` and access the field of its `Output`
32   |
33LL |     let _: i32 = tuple().await.0;
34   |                         ++++++
35
36error[E0609]: no field `a` on type `impl Future<Output = Struct>`
37  --> $DIR/issue-61076.rs:75:28
38   |
39LL |     let _: i32 = struct_().a;
40   |                            ^ field not available in `impl Future`, but it is available in its `Output`
41   |
42help: consider `await`ing on the `Future` and access the field of its `Output`
43   |
44LL |     let _: i32 = struct_().await.a;
45   |                           ++++++
46
47error[E0599]: no method named `method` found for opaque type `impl Future<Output = Struct>` in the current scope
48  --> $DIR/issue-61076.rs:79:15
49   |
50LL |     struct_().method();
51   |               ^^^^^^ method not found in `impl Future<Output = Struct>`
52   |
53help: consider `await`ing on the `Future` and calling the method on its `Output`
54   |
55LL |     struct_().await.method();
56   |               ++++++
57
58error[E0308]: mismatched types
59  --> $DIR/issue-61076.rs:88:9
60   |
61LL |     match tuple() {
62   |           ------- this expression has type `impl Future<Output = Tuple>`
63LL |
64LL |         Tuple(_) => {}
65   |         ^^^^^^^^ expected future, found `Tuple`
66   |
67   = note: expected opaque type `impl Future<Output = Tuple>`
68                   found struct `Tuple`
69help: consider `await`ing on the `Future`
70   |
71LL |     match tuple().await {
72   |                  ++++++
73
74error: aborting due to 6 previous errors
75
76Some errors have detailed explanations: E0277, E0308, E0599, E0609.
77For more information about an error, try `rustc --explain E0277`.
78