11error[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
33 |
44LL | foo()?;
55 | ^^^^^^
@@ -11,7 +11,7 @@ LL | foo()?;
1111 = note: required by `std::ops::Try::into_result`
1212
1313error[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
1515 |
1616LL | t?;
1717 | ^^
@@ -22,6 +22,38 @@ LL | t?;
2222 = help: the trait `std::ops::Try` is not implemented for `T`
2323 = note: required by `std::ops::Try::into_result`
2424
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
2657
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