diff --git a/src/test/compile-fail/borrowck-autoref-3261.rs b/src/test/compile-fail/borrowck-autoref-3261.rs index 6f2aa5d681a0b..2f46cc9fc0341 100644 --- a/src/test/compile-fail/borrowck-autoref-3261.rs +++ b/src/test/compile-fail/borrowck-autoref-3261.rs @@ -18,8 +18,8 @@ impl &X { fn main() { let mut x = X(Right(main)); do (&mut x).with |opt| { //~ ERROR illegal borrow - match *opt { - Right(f) => { + match opt { + &Right(f) => { x = X(Left((0,0))); f() },