Skip to content

Commit 6b4a9c1

Browse files
authored
Rollup merge of #48727 - leodasvacas:refactor-contrived-match, r=rkruppe
Refactor contrived match.
2 parents aff626a + 0b0e1b7 commit 6b4a9c1

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

src/librustc_mir/transform/lower_128bit.rs

+6-13
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,12 @@ impl Lower128Bit {
7777
};
7878

7979
let bin_statement = block.statements.pop().unwrap();
80-
let (source_info, place, lhs, mut rhs) = match bin_statement {
81-
Statement {
82-
source_info,
83-
kind: StatementKind::Assign(
84-
place,
85-
Rvalue::BinaryOp(_, lhs, rhs))
86-
} => (source_info, place, lhs, rhs),
87-
Statement {
88-
source_info,
89-
kind: StatementKind::Assign(
90-
place,
91-
Rvalue::CheckedBinaryOp(_, lhs, rhs))
92-
} => (source_info, place, lhs, rhs),
80+
let source_info = bin_statement.source_info;
81+
let (place, lhs, mut rhs) = match bin_statement.kind {
82+
StatementKind::Assign(place, Rvalue::BinaryOp(_, lhs, rhs))
83+
| StatementKind::Assign(place, Rvalue::CheckedBinaryOp(_, lhs, rhs)) => {
84+
(place, lhs, rhs)
85+
}
9386
_ => bug!("Statement doesn't match pattern any more?"),
9487
};
9588

0 commit comments

Comments
 (0)