Skip to content

Commit d16b1f4

Browse files
committed
Remove more unnecessary return keywords.
1 parent f865011 commit d16b1f4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

compiler/rustc_expand/src/mbe/macro_rules.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ fn expand_macro<'cx>(
257257

258258
// Let the context choose how to interpret the result.
259259
// Weird, but useful for X-macros.
260-
return Box::new(ParserAnyMacro {
260+
Box::new(ParserAnyMacro {
261261
parser: p,
262262

263263
// Pass along the original expansion site and the name of the macro
@@ -269,18 +269,17 @@ fn expand_macro<'cx>(
269269
is_trailing_mac: cx.current_expansion.is_trailing_mac,
270270
arm_span,
271271
is_local,
272-
});
272+
})
273273
}
274274
Err(CanRetry::No(_)) => {
275275
debug!("Will not retry matching as an error was emitted already");
276-
return DummyResult::any(sp);
276+
DummyResult::any(sp)
277277
}
278278
Err(CanRetry::Yes) => {
279-
// Retry and emit a better error below.
279+
// Retry and emit a better error.
280+
diagnostics::failed_to_match_macro(cx, sp, def_span, name, arg, lhses)
280281
}
281282
}
282-
283-
diagnostics::failed_to_match_macro(cx, sp, def_span, name, arg, lhses)
284283
}
285284

286285
pub(super) enum CanRetry {

0 commit comments

Comments
 (0)