Skip to content

Commit 4042811

Browse files
committed
Use Foo instead of raw arrays
1 parent 156173f commit 4042811

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/run-pass/generator/size-moved-locals.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ fn overlap_move_points() -> impl Generator<Yield = (), Return = ()> {
5757

5858
fn overlap_x_and_y() -> impl Generator<Yield = (), Return = ()>{
5959
static || {
60-
let x = [0u8; 1024];
60+
let x = Foo([0; FOO_SIZE]);
6161
yield;
6262
drop(x);
63-
let y = [0u8;1024];
63+
let y = Foo([0; FOO_SIZE]);
6464
yield;
6565
drop(y);
6666
}
@@ -70,5 +70,5 @@ fn main() {
7070
assert_eq!(1028, std::mem::size_of_val(&move_before_yield()));
7171
assert_eq!(1032, std::mem::size_of_val(&move_before_yield_with_noop()));
7272
assert_eq!(2056, std::mem::size_of_val(&overlap_move_points()));
73-
assert_eq!(2052, std::mem::size_of_val(&overlap_x_and_y()));
73+
assert_eq!(1032, std::mem::size_of_val(&overlap_x_and_y()));
7474
}

0 commit comments

Comments
 (0)