2019-10-02 01:34:31 -05:00
|
|
|
// check-pass
|
2021-09-19 11:57:19 -05:00
|
|
|
// incremental
|
|
|
|
// compile-flags: -Z query-dep-graph
|
2019-10-02 01:34:31 -05:00
|
|
|
// edition:2018
|
|
|
|
|
2019-10-02 04:59:05 -05:00
|
|
|
// Regression test for ICE related to `await`ing in a method + incr. comp. (#64964)
|
2019-10-02 01:34:31 -05:00
|
|
|
|
|
|
|
struct Body;
|
|
|
|
impl Body {
|
|
|
|
async fn next(&mut self) {
|
|
|
|
async {}.await
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Another reproduction: `await`ing with a variable from for-loop.
|
|
|
|
|
|
|
|
async fn bar() {
|
|
|
|
for x in 0..10 {
|
|
|
|
async { Some(x) }.await.unwrap();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|