mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-28 13:46:03 +00:00

``` error[E0277]: `()` is not a future --> $DIR/unnecessary-await.rs:28:10 | LL | e!().await; | ^^^^^ `()` is not a future | = help: the trait `Future` is not implemented for `()` = note: () must be a future or must implement `IntoFuture` to be awaited = note: required for `()` to implement `IntoFuture` help: remove the `.await` | LL - e!().await; LL + e!(); | ``` ``` error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/const-fn-in-vec.rs:1:47 | LL | static _MAYBE_STRINGS: [Option<String>; 5] = [None; 5]; | ^^^^ the trait `Copy` is not implemented for `String` | = note: required for `Option<String>` to implement `Copy` = note: the `Copy` trait is required because this value will be copied for each element of the array help: create an inline `const` block | LL | static _MAYBE_STRINGS: [Option<String>; 5] = [const { None }; 5]; | +++++++ + ```
28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
error[E0559]: variant `Option<_>::None` has no field named `value`
|
|
--> $DIR/drop-track-bad-field-in-fru.rs:6:12
|
|
|
|
|
LL | None { value: (), ..Default::default() }.await;
|
|
| ^^^^^ `Option<_>::None` does not have this field
|
|
|
|
|
= note: all struct fields are already assigned
|
|
|
|
error[E0277]: `Option<_>` is not a future
|
|
--> $DIR/drop-track-bad-field-in-fru.rs:6:46
|
|
|
|
|
LL | None { value: (), ..Default::default() }.await;
|
|
| ^^^^^ `Option<_>` is not a future
|
|
|
|
|
= help: the trait `Future` is not implemented for `Option<_>`
|
|
= note: Option<_> must be a future or must implement `IntoFuture` to be awaited
|
|
= note: required for `Option<_>` to implement `IntoFuture`
|
|
help: remove the `.await`
|
|
|
|
|
LL - None { value: (), ..Default::default() }.await;
|
|
LL + None { value: (), ..Default::default() };
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
Some errors have detailed explanations: E0277, E0559.
|
|
For more information about an error, try `rustc --explain E0277`.
|