1 #![feature(generators)]
5 use std::mem::size_of_val;
8 // Generator taking a `Copy`able resume arg.
9 let gen_copy = |mut x: usize| {
16 // Generator taking a non-`Copy` resume arg.
17 let gen_move = |mut x: Box<usize>| {
24 // Neither of these generators have the resume arg live across the `yield`, so they should be
25 // 1 Byte in size (only storing the discriminant)
26 assert_eq!(size_of_val(&gen_copy), 1);
27 assert_eq!(size_of_val(&gen_move), 1);