While working on #8641, I found a lot of places where we unnecessarily use `ref` / `ref mut` in match arms.
In many cases, we're creating double-references (turning a `&T` into a `&&T`). The compiler should be smart enough to remove them for us, but there doesn't seem much point in explicitly creating double-references when we don't actually want them, and relying on compiler to optimize them out again.