add test for earlier drop despite extend lifetime
This commit is contained in:
parent
02443552c5
commit
e26285603c
@ -74,6 +74,17 @@ fn drop(&mut self) {
|
||||
};
|
||||
}
|
||||
}
|
||||
{
|
||||
fn must_pass() {
|
||||
let rc = Rc::new(());
|
||||
let &None = &Some(Rc::clone(&rc)) else {
|
||||
Rc::try_unwrap(rc).unwrap();
|
||||
return;
|
||||
};
|
||||
unreachable!();
|
||||
}
|
||||
must_pass();
|
||||
}
|
||||
{
|
||||
// test let-else drops temps before else block
|
||||
// NOTE: this test has to be the last block in the `main`
|
||||
|
Loading…
Reference in New Issue
Block a user