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 0244355 commit e262856Copy full SHA for e262856
src/test/ui/let-else/let-else-temporary-lifetime.rs
@@ -74,6 +74,17 @@ fn main() {
74
};
75
}
76
77
+ {
78
+ fn must_pass() {
79
+ let rc = Rc::new(());
80
+ let &None = &Some(Rc::clone(&rc)) else {
81
+ Rc::try_unwrap(rc).unwrap();
82
+ return;
83
+ };
84
+ unreachable!();
85
+ }
86
+ must_pass();
87
88
{
89
// test let-else drops temps before else block
90
// NOTE: this test has to be the last block in the `main`
0 commit comments