From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/suggestions/issue-96555.stderr | 66 +++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 tests/ui/suggestions/issue-96555.stderr (limited to 'tests/ui/suggestions/issue-96555.stderr') diff --git a/tests/ui/suggestions/issue-96555.stderr b/tests/ui/suggestions/issue-96555.stderr new file mode 100644 index 000000000..9a8a183dc --- /dev/null +++ b/tests/ui/suggestions/issue-96555.stderr @@ -0,0 +1,66 @@ +error[E0277]: `()` is not a future + --> $DIR/issue-96555.rs:4:12 + | +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:12 + | +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:12 + | +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`. -- cgit v1.2.3