diff --git a/src/test/ui/async-await/async-error-span.rs b/src/test/ui/async-await/async-error-span.rs index 338483ff6acd..86d459bf084b 100644 --- a/src/test/ui/async-await/async-error-span.rs +++ b/src/test/ui/async-await/async-error-span.rs @@ -5,7 +5,8 @@ use std::future::Future; fn get_future() -> impl Future { - panic!() //~^ ERROR `()` is not a future +//~^ ERROR `()` is not a future + panic!() } async fn foo() { diff --git a/src/test/ui/async-await/async-error-span.stderr b/src/test/ui/async-await/async-error-span.stderr index 18e8dd940fa0..7d4447b6d557 100644 --- a/src/test/ui/async-await/async-error-span.stderr +++ b/src/test/ui/async-await/async-error-span.stderr @@ -8,13 +8,13 @@ LL | fn get_future() -> impl Future { = note: () must be a future or must implement `IntoFuture` to be awaited error[E0698]: type inside `async fn` body must be known in this context - --> $DIR/async-error-span.rs:12:9 + --> $DIR/async-error-span.rs:13:9 | LL | let a; | ^ cannot infer type | note: the type is part of the `async fn` body because of this `await` - --> $DIR/async-error-span.rs:13:17 + --> $DIR/async-error-span.rs:14:17 | LL | get_future().await; | ^^^^^^