mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
19 lines
360 B
Rust
19 lines
360 B
Rust
//@run-rustfix
|
|
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, is_empty: helpers[0].is_empty() }
|
|
//~^ ERROR borrow of moved value
|
|
}
|
|
}
|
|
|
|
fn main() {}
|