1
1
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
2
- --> $DIR/issue-61076.rs:22 :5
2
+ --> $DIR/issue-61076.rs:32 :5
3
3
|
4
4
LL | foo()?;
5
5
| ^^^^^^
@@ -11,7 +11,7 @@ LL | foo()?;
11
11
= note: required by `std::ops::Try::into_result`
12
12
13
13
error[E0277]: the `?` operator can only be applied to values that implement `std::ops::Try`
14
- --> $DIR/issue-61076.rs:28 :5
14
+ --> $DIR/issue-61076.rs:38 :5
15
15
|
16
16
LL | t?;
17
17
| ^^
@@ -22,6 +22,38 @@ LL | t?;
22
22
= help: the trait `std::ops::Try` is not implemented for `T`
23
23
= note: required by `std::ops::Try::into_result`
24
24
25
- error: aborting due to 2 previous errors
25
+ error[E0609]: no field `0` on type `impl std::future::Future`
26
+ --> $DIR/issue-61076.rs:42:7
27
+ |
28
+ LL | }.0;
29
+ | ^
30
+
31
+ error[E0609]: no field `a` on type `impl std::future::Future`
32
+ --> $DIR/issue-61076.rs:46:7
33
+ |
34
+ LL | }.a;
35
+ | ^
36
+
37
+ error[E0308]: mismatched types
38
+ --> $DIR/issue-61076.rs:48:12
39
+ |
40
+ LL | A
41
+ | - unit variant defined here
42
+ ...
43
+ LL | if let Enum::A = async { Enum::A } {}
44
+ | ^^^^^^^ ----------- the expected generator
45
+ | |
46
+ | expected opaque type, found enum `Enum`
47
+ |
48
+ ::: $SRC_DIR/libcore/future/mod.rs:LL:COL
49
+ |
50
+ LL | pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
51
+ | ------------------------------- the expected opaque type
52
+ |
53
+ = note: expected opaque type `impl std::future::Future`
54
+ found enum `Enum`
55
+
56
+ error: aborting due to 5 previous errors
26
57
27
- For more information about this error, try `rustc --explain E0277`.
58
+ Some errors have detailed explanations: E0277, E0308, E0609.
59
+ For more information about an error, try `rustc --explain E0277`.
0 commit comments