blob: 248ce80d22bf77b9ee4074a05e4c517929e3ba92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//@ 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() {}
|