2024-02-16 14:02:50 -06:00
|
|
|
//@ run-rustfix
|
2024-02-09 19:53:45 -06:00
|
|
|
pub struct DataStruct();
|
|
|
|
|
|
|
|
pub struct HelperStruct<'n> {
|
|
|
|
pub helpers: [Vec<&'n i64>; 2],
|
|
|
|
pub is_empty: bool,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl DataStruct {
|
|
|
|
pub fn f(&self) -> HelperStruct {
|
|
|
|
let helpers = [vec![], vec![]];
|
|
|
|
|
|
|
|
HelperStruct { helpers: helpers.clone(), is_empty: helpers[0].is_empty() }
|
|
|
|
//~^ ERROR borrow of moved value
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|