]> git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issue-61076.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / async-await / issue-61076.stderr
1 error[E0277]: the `?` operator can only be applied to values that implement `Try`
2 --> $DIR/issue-61076.rs:42:5
3 |
4 LL | foo()?;
5 | ^^^^^^ the `?` operator cannot be applied to type `impl Future`
6 |
7 = help: the trait `Try` is not implemented for `impl Future`
8 note: required by `branch`
9 --> $SRC_DIR/core/src/ops/try_trait.rs:LL:COL
10 |
11 LL | fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
12 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 help: consider `await`ing on the `Future`
14 |
15 LL | foo().await?;
16 | ++++++
17
18 error[E0277]: the `?` operator can only be applied to values that implement `Try`
19 --> $DIR/issue-61076.rs:67:5
20 |
21 LL | t?;
22 | ^^ the `?` operator cannot be applied to type `T`
23 |
24 = help: the trait `Try` is not implemented for `T`
25 note: required by `branch`
26 --> $SRC_DIR/core/src/ops/try_trait.rs:LL:COL
27 |
28 LL | fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 help: consider `await`ing on the `Future`
31 |
32 LL | t.await?;
33 | ++++++
34
35 error[E0609]: no field `0` on type `impl Future`
36 --> $DIR/issue-61076.rs:78:26
37 |
38 LL | let _: i32 = tuple().0;
39 | ^ field not available in `impl Future`, but it is available in its `Output`
40 |
41 help: consider `await`ing on the `Future` and access the field of its `Output`
42 |
43 LL | let _: i32 = tuple().await.0;
44 | ++++++
45
46 error[E0609]: no field `a` on type `impl Future`
47 --> $DIR/issue-61076.rs:82:28
48 |
49 LL | let _: i32 = struct_().a;
50 | ^ field not available in `impl Future`, but it is available in its `Output`
51 |
52 help: consider `await`ing on the `Future` and access the field of its `Output`
53 |
54 LL | let _: i32 = struct_().await.a;
55 | ++++++
56
57 error[E0599]: no method named `method` found for opaque type `impl Future` in the current scope
58 --> $DIR/issue-61076.rs:86:15
59 |
60 LL | struct_().method();
61 | ^^^^^^ method not found in `impl Future`
62 |
63 help: consider `await`ing on the `Future` and calling the method on its `Output`
64 |
65 LL | struct_().await.method();
66 | ++++++
67
68 error[E0308]: mismatched types
69 --> $DIR/issue-61076.rs:94:9
70 |
71 LL | Tuple(_) => {}
72 | ^^^^^^^^ expected opaque type, found struct `Tuple`
73 |
74 note: while checking the return type of the `async fn`
75 --> $DIR/issue-61076.rs:58:21
76 |
77 LL | async fn tuple() -> Tuple {
78 | ^^^^^ checked the `Output` of this `async fn`, expected opaque type
79 = note: expected opaque type `impl Future`
80 found struct `Tuple`
81 help: consider `await`ing on the `Future`
82 |
83 LL | match tuple().await {
84 | ++++++
85
86 error: aborting due to 6 previous errors
87
88 Some errors have detailed explanations: E0277, E0308, E0599, E0609.
89 For more information about an error, try `rustc --explain E0277`.