Skip to content

Commit 0d5ab3e

Browse files
committed
mbe: Simplify a match to a let-else
1 parent a7382ea commit 0d5ab3e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_expand/src/mbe/macro_rules.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,8 @@ fn expand_macro<'cx>(
213213

214214
match try_success_result {
215215
Ok((i, named_matches)) => {
216-
let (rhs, rhs_span): (&mbe::Delimited, DelimSpan) = match &rhses[i] {
217-
mbe::TokenTree::Delimited(span, _, delimited) => (&delimited, *span),
218-
_ => cx.dcx().span_bug(sp, "malformed macro rhs"),
216+
let mbe::TokenTree::Delimited(rhs_span, _, ref rhs) = rhses[i] else {
217+
cx.dcx().span_bug(sp, "malformed macro rhs");
219218
};
220219
let arm_span = rhses[i].span();
221220

0 commit comments

Comments
 (0)