rust/tests/ui/async-await/drop-track-bad-field-in-fru.stderr
Esteban Küber ac980cace8 Make obligation cause code suggestions verbose
```
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];
   |                                               +++++++      +
```
2025-06-06 20:12:11 +00:00

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`.