Skip to content

Commit f502dce

Browse files
committed
Add regression test for issue #103476, fixed in edition 2024
1 parent 427d915 commit f502dce

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// issue-103476
2+
//@ compile-flags: -Zlint-mir -Zunstable-options
3+
//@ edition: 2024
4+
//@ check-pass
5+
6+
#![feature(let_chains)]
7+
#![allow(irrefutable_let_patterns)]
8+
9+
struct Pd;
10+
11+
impl Pd {
12+
fn it(&self) -> It {
13+
todo!()
14+
}
15+
}
16+
17+
pub struct It<'a>(Box<dyn Tr<'a>>);
18+
19+
trait Tr<'a> {}
20+
21+
fn f(m: Option<Pd>) {
22+
if let Some(n) = m && let it = n.it() {};
23+
}
24+
25+
fn main() {}

0 commit comments

Comments
 (0)