Files
rust/src/test/ui/async-await/issue-61076.stderr

59 lines
1.8 KiB
Plaintext
Raw Normal View History

error[E0277]: the `?` operator can only be applied to values that implement `Try`
2020-08-20 15:34:08 +08:00
--> $DIR/issue-61076.rs:42:5
2020-05-10 22:34:20 +08:00
|
LL | foo()?;
| ^^^^^^
| |
| the `?` operator cannot be applied to type `impl Future`
2020-05-10 22:34:20 +08:00
| help: consider using `.await` here: `foo().await?`
|
= help: the trait `Try` is not implemented for `impl Future`
= note: required by `into_result`
2020-05-10 22:34:20 +08:00
error[E0277]: the `?` operator can only be applied to values that implement `Try`
2020-08-20 15:34:08 +08:00
--> $DIR/issue-61076.rs:56:5
2020-05-14 23:07:46 +08:00
|
LL | t?;
| ^^
| |
| the `?` operator cannot be applied to type `T`
| help: consider using `.await` here: `t.await?`
|
= help: the trait `Try` is not implemented for `T`
= note: required by `into_result`
2020-05-14 23:07:46 +08:00
error[E0609]: no field `0` on type `impl Future`
2020-08-20 15:34:08 +08:00
--> $DIR/issue-61076.rs:58:26
2020-05-30 22:57:12 +08:00
|
2020-08-16 20:25:22 +08:00
LL | let _: i32 = tuple().0;
2020-08-20 18:42:08 +08:00
| ^
2020-05-30 22:57:12 +08:00
error[E0609]: no field `a` on type `impl Future`
2020-08-20 15:34:08 +08:00
--> $DIR/issue-61076.rs:60:28
2020-05-30 22:57:12 +08:00
|
2020-08-16 20:25:22 +08:00
LL | let _: i32 = struct_().a;
2020-08-20 18:42:08 +08:00
| ^
2020-05-30 22:57:12 +08:00
error[E0599]: no method named `method` found for opaque type `impl Future` in the current scope
2020-08-20 15:34:08 +08:00
--> $DIR/issue-61076.rs:62:15
|
LL | struct_().method();
| ^^^^^^ method not found in `impl Future`
2020-08-20 15:34:08 +08:00
2020-08-20 18:42:08 +08:00
error[E0308]: mismatched types
--> $DIR/issue-61076.rs:69:9
|
LL | async fn tuple() -> Tuple {
| ----- the `Output` of this `async fn`'s expected opaque type
...
LL | Tuple(_) => {}
| ^^^^^^^^ expected opaque type, found struct `Tuple`
|
= note: expected opaque type `impl Future`
2020-08-20 18:42:08 +08:00
found struct `Tuple`
error: aborting due to 6 previous errors
2020-05-10 22:34:20 +08:00
2020-08-20 18:42:08 +08:00
Some errors have detailed explanations: E0277, E0308, E0599, E0609.
2020-05-30 22:57:12 +08:00
For more information about an error, try `rustc --explain E0277`.