Skip to content

Commit 9e579cc

Browse files
committed
Add test
1 parent 1767585 commit 9e579cc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: tests/ui/async-await/missed-capture-issue-107414.rs

+24
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)