Skip to content

Commit 3723fc1

Browse files
Use match ergonomics to simplify match
1 parent f77d107 commit 3723fc1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc_mir/dataflow/impls/storage_liveness.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ impl<'mir, 'tcx> BitDenotation<'tcx> for RequiresStorage<'mir, 'tcx> {
118118
self.borrowed_locals.borrow().analysis().statement_effect(sets, stmt, loc);
119119

120120
// If a place is assigned to in a statement, it needs storage for that statement.
121-
match stmt.kind {
122-
StatementKind::StorageDead(l) => sets.kill(l),
123-
StatementKind::Assign(box (ref place, _))
124-
| StatementKind::SetDiscriminant { box ref place, .. } => {
121+
match &stmt.kind {
122+
StatementKind::StorageDead(l) => sets.kill(*l),
123+
StatementKind::Assign(box (place, _))
124+
| StatementKind::SetDiscriminant { box place, .. } => {
125125
sets.gen(place.local);
126126
}
127-
StatementKind::InlineAsm(box InlineAsm { ref outputs, .. }) => {
127+
StatementKind::InlineAsm(box InlineAsm { outputs, .. }) => {
128128
for place in &**outputs {
129129
sets.gen(place.local);
130130
}

0 commit comments

Comments
 (0)