rust/tests/ui/async-await/issues/issue-64964.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
426 B
Rust
Raw Normal View History

2019-10-02 06:34:31 +00:00
// check-pass
// incremental
// compile-flags: -Z query-dep-graph
2019-10-02 06:34:31 +00:00
// edition:2018
2019-10-02 09:59:05 +00:00
// Regression test for ICE related to `await`ing in a method + incr. comp. (#64964)
2019-10-02 06:34:31 +00: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() {}