Add test
This commit is contained in:
parent
1767585509
commit
9e579cc10c
24
tests/ui/async-await/missed-capture-issue-107414.rs
Normal file
24
tests/ui/async-await/missed-capture-issue-107414.rs
Normal file
@ -0,0 +1,24 @@
|
||||
// check-pass
|
||||
// edition:2018
|
||||
|
||||
fn main() {}
|
||||
|
||||
struct StructA {}
|
||||
struct StructB {}
|
||||
|
||||
impl StructA {
|
||||
fn fn_taking_struct_b(&self, struct_b: &StructB) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
async fn get_struct_a_async() -> StructA {
|
||||
StructA {}
|
||||
}
|
||||
|
||||
async fn ice() {
|
||||
match Some(StructB {}) {
|
||||
Some(struct_b) if get_struct_a_async().await.fn_taking_struct_b(&struct_b) => {}
|
||||
_ => {}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user