diff options
Diffstat (limited to 'tests/ui/async-await/async-error-span.rs')
-rw-r--r-- | tests/ui/async-await/async-error-span.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/async-await/async-error-span.rs b/tests/ui/async-await/async-error-span.rs new file mode 100644 index 000000000..86d459bf0 --- /dev/null +++ b/tests/ui/async-await/async-error-span.rs @@ -0,0 +1,17 @@ +// edition:2018 + +// Regression test for issue #62382. + +use std::future::Future; + +fn get_future() -> impl Future<Output = ()> { +//~^ ERROR `()` is not a future + panic!() +} + +async fn foo() { + let a; //~ ERROR type inside `async fn` body must be known in this context + get_future().await; +} + +fn main() {} |