mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
24 lines
430 B
Rust
24 lines
430 B
Rust
//@ check-pass
|
|
//@ incremental
|
|
//@ compile-flags: -Z query-dep-graph
|
|
//@ edition:2018
|
|
|
|
// Regression test for ICE related to `await`ing in a method + incr. comp. (#64964)
|
|
|
|
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() {}
|