From 7fd9c7e6de6d214abd5cc6c2c28231e351a807d5 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 27 Jan 2022 16:15:58 +0000 Subject: [PATCH] undo a useless change --- src/test/ui/async-await/async-error-span.rs | 3 ++- src/test/ui/async-await/async-error-span.stderr | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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; | ^^^^^^