From 33a64699b1f630640a7281be6493643904e5daa4 Mon Sep 17 00:00:00 2001 From: Giles Cope Date: Tue, 5 Mar 2019 09:06:24 +0000 Subject: [PATCH] Unrolled await macro. Was then able to the minimise the reproduction a little further. --- .../issue-57084.rs} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename src/test/run-pass/{issues/issue-57084-async-await.rs => generator/issue-57084.rs} (62%) diff --git a/src/test/run-pass/issues/issue-57084-async-await.rs b/src/test/run-pass/generator/issue-57084.rs similarity index 62% rename from src/test/run-pass/issues/issue-57084-async-await.rs rename to src/test/run-pass/generator/issue-57084.rs index feed68b5db1..38c86dccb80 100644 --- a/src/test/run-pass/issues/issue-57084-async-await.rs +++ b/src/test/run-pass/generator/issue-57084.rs @@ -1,7 +1,7 @@ // This issue reproduces an ICE on compile (E.g. fails on 2018-12-19 nightly). // run-pass // edition:2018 -#![feature(async_await,futures_api,await_macro,generators)] +#![feature(async_await,futures_api,generators)] pub struct Foo; @@ -16,12 +16,12 @@ impl Foo { } } - pub async fn run<'a>(&'a self, data: &'a [u8]) + pub async fn run<'a>(&'a self, data: &'a [u8]) { - await!(self.with(move || { - println!("{:p}", data); - })) + let _to_pin = self.with(move || println!("{:p}", data)); + loop { + yield + } } } - fn main() {}