]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/copy-suggestion-region-vid.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / borrowck / copy-suggestion-region-vid.rs
1 pub struct DataStruct();
2
3 pub struct HelperStruct<'n> {
4     pub helpers: [Vec<&'n i64>; 2],
5     pub is_empty: bool,
6 }
7
8 impl DataStruct {
9     pub fn f(&self) -> HelperStruct {
10         let helpers = [vec![], vec![]];
11
12         HelperStruct { helpers, is_empty: helpers[0].is_empty() }
13         //~^ ERROR borrow of moved value
14     }
15 }
16
17 fn main() {}