@@ -5,35 +5,25 @@ LL | foo()?;
5
5
| ^^^^^^ the `?` operator cannot be applied to type `impl Future`
6
6
|
7
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
8
help: consider `await`ing on the `Future`
14
9
|
15
10
LL | foo().await?;
16
11
| ++++++
17
12
18
13
error[E0277]: the `?` operator can only be applied to values that implement `Try`
19
- --> $DIR/issue-61076.rs:67 :5
14
+ --> $DIR/issue-61076.rs:65 :5
20
15
|
21
16
LL | t?;
22
17
| ^^ the `?` operator cannot be applied to type `T`
23
18
|
24
19
= 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
20
help: consider `await`ing on the `Future`
31
21
|
32
22
LL | t.await?;
33
23
| ++++++
34
24
35
25
error[E0609]: no field `0` on type `impl Future`
36
- --> $DIR/issue-61076.rs:78 :26
26
+ --> $DIR/issue-61076.rs:74 :26
37
27
|
38
28
LL | let _: i32 = tuple().0;
39
29
| ^ field not available in `impl Future`, but it is available in its `Output`
@@ -44,7 +34,7 @@ LL | let _: i32 = tuple().await.0;
44
34
| ++++++
45
35
46
36
error[E0609]: no field `a` on type `impl Future`
47
- --> $DIR/issue-61076.rs:82 :28
37
+ --> $DIR/issue-61076.rs:78 :28
48
38
|
49
39
LL | let _: i32 = struct_().a;
50
40
| ^ field not available in `impl Future`, but it is available in its `Output`
@@ -55,7 +45,7 @@ LL | let _: i32 = struct_().await.a;
55
45
| ++++++
56
46
57
47
error[E0599]: no method named `method` found for opaque type `impl Future` in the current scope
58
- --> $DIR/issue-61076.rs:86 :15
48
+ --> $DIR/issue-61076.rs:82 :15
59
49
|
60
50
LL | struct_().method();
61
51
| ^^^^^^ method not found in `impl Future`
@@ -66,13 +56,13 @@ LL | struct_().await.method();
66
56
| ++++++
67
57
68
58
error[E0308]: mismatched types
69
- --> $DIR/issue-61076.rs:94 :9
59
+ --> $DIR/issue-61076.rs:90 :9
70
60
|
71
61
LL | Tuple(_) => {}
72
62
| ^^^^^^^^ expected opaque type, found struct `Tuple`
73
63
|
74
64
note: while checking the return type of the `async fn`
75
- --> $DIR/issue-61076.rs:58 :21
65
+ --> $DIR/issue-61076.rs:56 :21
76
66
|
77
67
LL | async fn tuple() -> Tuple {
78
68
| ^^^^^ checked the `Output` of this `async fn`, expected opaque type
0 commit comments