1 enum Either<T, U> { Left(T), Right(U) }
3 struct X(Either<(usize,usize), fn()>);
6 pub fn with<F>(&self, blk: F) where F: FnOnce(&Either<(usize, usize), fn()>) {
13 let mut x = X(Either::Right(main as fn()));
15 |opt| { //~ ERROR cannot borrow `x` as mutable more than once at a time
17 &Either::Right(ref f) => {
18 x = X(Either::Left((0, 0)));