Skip to content

Commit 9735d52

Browse files
Copilotnunoplopes
andauthored
Update expected test outputs for std::array default init fix
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
1 parent f4264d4 commit 9735d52

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎tests/unit/out/refcount/empty_array_init.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ pub fn main() {
1010
std::process::exit(main_0());
1111
}
1212
fn main_0() -> i32 {
13-
let vec_: Value<Vec<i32>> = Rc::new(RefCell::new(vec![]));
13+
let vec_: Value<Vec<i32>> = Rc::new(RefCell::new(
14+
std::array::from_fn::<_, 3, _>(|_| Default::default()).to_vec(),
15+
));
1416
return 0;
1517
}

‎tests/unit/out/unsafe/empty_array_init.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ pub fn main() {
1212
}
1313
}
1414
unsafe fn main_0() -> i32 {
15-
let mut vec_: Vec<i32> = vec![];
15+
let mut vec_: Vec<i32> = std::array::from_fn::<_, 3, _>(|_| Default::default()).to_vec();
1616
return 0;
1717
}

0 commit comments

Comments
 (0)