2020-06-20 15:38:57 -05:00
|
|
|
const _: Option<Vec<i32>> = {
|
|
|
|
let mut never_returned = Some(Vec::new());
|
2022-09-23 09:22:36 -05:00
|
|
|
let mut always_returned = None; //~ ERROR destructor of
|
2020-06-20 15:38:57 -05:00
|
|
|
|
|
|
|
let mut i = 0;
|
|
|
|
loop {
|
|
|
|
always_returned = never_returned;
|
|
|
|
never_returned = None;
|
|
|
|
|
|
|
|
i += 1;
|
|
|
|
if i == 10 {
|
|
|
|
break always_returned;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
fn main() {}
|