Closed
Description
Consider these two examples:
match x {
&A => ...,
...
}
match *x {
A => ...,
...
}
The two are not precisely equivalent, because the first only works if x
is an immutable reference while the second dereferences and is thus more general. But any instance of the former can be converted to the latter form with no change in functionality.
I personally would like to see rustfmt normalising the former to the latter.