We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c2677d commit 7b45c59Copy full SHA for 7b45c59
tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs
@@ -0,0 +1,29 @@
1
+// issue-103476
2
+//@ revisions: edition2021 edition2024
3
+//@ [edition2021] edition: 2021
4
+//@ [edition2024] edition: 2024
5
+//@ check-pass
6
+
7
+#![feature(if_let_guard)]
8
+#![allow(irrefutable_let_patterns)]
9
10
+struct Pd;
11
12
+impl Pd {
13
+ fn it(&self) -> It {
14
+ todo!()
15
+ }
16
+}
17
18
+pub struct It<'a>(Box<dyn Tr<'a>>);
19
20
+trait Tr<'a> {}
21
22
+fn f(m: Option<Pd>) {
23
+ match () {
24
+ () if let Some(n) = m && let it = n.it() => {}
25
+ _ => {}
26
27
28
29
+fn main() {}
0 commit comments