//@ run-pass fn swap(f: F) -> Vec where F: FnOnce(Vec) -> Vec { let x = vec![1, 2, 3]; f(x) } pub fn main() { let v = swap(|mut x| { x.push(4); x }); let w = swap(|mut x| { x.push(4); x }); assert_eq!(v, w); }