Skip to content

Commit

Permalink
Use Foo instead of raw arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jul 24, 2019
1 parent 156173f commit 4042811
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/test/run-pass/generator/size-moved-locals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ fn overlap_move_points() -> impl Generator<Yield = (), Return = ()> {

fn overlap_x_and_y() -> impl Generator<Yield = (), Return = ()>{
static || {
let x = [0u8; 1024];
let x = Foo([0; FOO_SIZE]);
yield;
drop(x);
let y = [0u8;1024];
let y = Foo([0; FOO_SIZE]);
yield;
drop(y);
}
Expand All @@ -70,5 +70,5 @@ fn main() {
assert_eq!(1028, std::mem::size_of_val(&move_before_yield()));
assert_eq!(1032, std::mem::size_of_val(&move_before_yield_with_noop()));
assert_eq!(2056, std::mem::size_of_val(&overlap_move_points()));
assert_eq!(2052, std::mem::size_of_val(&overlap_x_and_y()));
assert_eq!(1032, std::mem::size_of_val(&overlap_x_and_y()));
}

0 comments on commit 4042811

Please sign in to comment.