]> git.lizzy.rs Git - rust.git/blob - src/test/ui/match/issue-84434.rs
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
[rust.git] / src / test / ui / match / issue-84434.rs
1 // https://github.com/rust-lang/rust/issues/84434
2 // check-pass
3
4 use std::path::Path;
5 struct A {
6     pub func: fn(check: bool, a: &Path, b: Option<&Path>),
7 }
8 const MY_A: A = A {
9     func: |check, a, b| {
10         if check {
11             let _ = ();
12         } else if let Some(parent) = b.and_then(|p| p.parent()) {
13             let _ = ();
14         }
15     },
16 };
17
18 fn main() {}