1 // issue-52240: Can turn immutable into mut with `ref mut`
8 let arr = vec!(Foo::Bar(0));
9 if let (Some(Foo::Bar(ref mut val)), _) = (&arr.get(0), 0) {
10 //~^ ERROR cannot borrow data in a `&` reference as mutable
14 Foo::Bar(ref s) => println!("{}", s)