Skip to content

Commit 52dad99

Browse files
authored
Rollup merge of #109902 - Nilstrieb:107414test, r=compiler-errors
Add async-await test for #107414 fixes #107414 r? `@cjgillot`
2 parents 7d3207b + 9e579cc commit 52dad99

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// check-pass
2+
// edition:2018
3+
4+
fn main() {}
5+
6+
struct StructA {}
7+
struct StructB {}
8+
9+
impl StructA {
10+
fn fn_taking_struct_b(&self, struct_b: &StructB) -> bool {
11+
true
12+
}
13+
}
14+
15+
async fn get_struct_a_async() -> StructA {
16+
StructA {}
17+
}
18+
19+
async fn ice() {
20+
match Some(StructB {}) {
21+
Some(struct_b) if get_struct_a_async().await.fn_taking_struct_b(&struct_b) => {}
22+
_ => {}
23+
}
24+
}

0 commit comments

Comments
 (0)