Skip to content

Commit 0e248b2

Browse files
committed
Add missing .fixed file for ui/borrowck/copy-suggestion-region-vid.rs
Original test file used an incorrect `//@ run-rustfix` (was still on compiletest `//` directives at the time).
1 parent c29082f commit 0e248b2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//@run-rustfix
2+
pub struct DataStruct();
3+
4+
pub struct HelperStruct<'n> {
5+
pub helpers: [Vec<&'n i64>; 2],
6+
pub is_empty: bool,
7+
}
8+
9+
impl DataStruct {
10+
pub fn f(&self) -> HelperStruct {
11+
let helpers = [vec![], vec![]];
12+
13+
HelperStruct { helpers: helpers.clone(), is_empty: helpers[0].is_empty() }
14+
//~^ ERROR borrow of moved value
15+
}
16+
}
17+
18+
fn main() {}

0 commit comments

Comments
 (0)