5b54286640
Remove the "which is required by `{root_obligation}`" post-script in "the trait `X` is not implemented for `Y`" explanation in E0277. This information is already conveyed in the notes explaining requirements, making it redundant while making the text (particularly in labels) harder to read. ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ``` vs the prior ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option<NotCopy>: Copy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ```
67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
error[E0277]: `()` is not a future
|
|
--> $DIR/issue-96555.rs:4:13
|
|
|
|
|
LL | m::f1().await;
|
|
| ------- ^^^^^ `()` is not a future
|
|
| |
|
|
| this call returns `()`
|
|
|
|
|
= 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 - m::f1().await;
|
|
LL + m::f1();
|
|
|
|
|
help: alternatively, consider making `fn f1` asynchronous
|
|
|
|
|
LL | pub async fn f1() {}
|
|
| +++++
|
|
|
|
error[E0277]: `()` is not a future
|
|
--> $DIR/issue-96555.rs:5:13
|
|
|
|
|
LL | m::f2().await;
|
|
| ------- ^^^^^ `()` is not a future
|
|
| |
|
|
| this call returns `()`
|
|
|
|
|
= 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 - m::f2().await;
|
|
LL + m::f2();
|
|
|
|
|
help: alternatively, consider making `fn f2` asynchronous
|
|
|
|
|
LL | pub(crate) async fn f2() {}
|
|
| +++++
|
|
|
|
error[E0277]: `()` is not a future
|
|
--> $DIR/issue-96555.rs:6:13
|
|
|
|
|
LL | m::f3().await;
|
|
| ------- ^^^^^ `()` is not a future
|
|
| |
|
|
| this call returns `()`
|
|
|
|
|
= 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 - m::f3().await;
|
|
LL + m::f3();
|
|
|
|
|
help: alternatively, consider making `fn f3` asynchronous
|
|
|
|
|
LL | pub async
|
|
| +++++
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|