Avoid matching with reference patterns.
This commit is contained in:
@@ -317,10 +317,10 @@ impl Move {
|
|||||||
/// Replace the "to" register with `new` and return the old value.
|
/// Replace the "to" register with `new` and return the old value.
|
||||||
fn replace_to_reg(&mut self, new: RegUnit) -> RegUnit {
|
fn replace_to_reg(&mut self, new: RegUnit) -> RegUnit {
|
||||||
mem::replace(
|
mem::replace(
|
||||||
match self {
|
match *self {
|
||||||
&mut Move::Reg { ref mut to, .. } |
|
Move::Reg { ref mut to, .. } |
|
||||||
&mut Move::Fill { ref mut to, .. } => to,
|
Move::Fill { ref mut to, .. } => to,
|
||||||
&mut Move::Spill { .. } => panic!("No to register in a spill {}", self),
|
Move::Spill { .. } => panic!("No to register in a spill {}", self),
|
||||||
},
|
},
|
||||||
new,
|
new,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user