We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 427d915 commit f502dceCopy full SHA for f502dce
tests/ui/rfcs/rfc-2497-if-let-chains/temporary-early-drop.rs
@@ -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