Skip to content

Commit

Permalink
Tweak some ugly formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
nnethercote committed Jun 22, 2024
1 parent 470b0e9 commit 70fa67c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/rustc_expand/src/mbe/macro_rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,10 @@ fn check_matcher_core<'tt>(
// whereas macros from an external crate have a dummy id.
if def.id != DUMMY_NODE_ID
&& matches!(kind, NonterminalKind::PatParam { inferred: true })
&& matches!(next_token, TokenTree::Token(token) if token.kind == BinOp(token::BinOpToken::Or))
&& matches!(
next_token,
TokenTree::Token(token) if token.kind == BinOp(token::BinOpToken::Or)
)
{
// It is suggestion to use pat_param, for example: $x:pat -> $x:pat_param.
let suggestion = quoted_tt_to_string(&TokenTree::MetaVarDecl(
Expand Down

0 comments on commit 70fa67c

Please sign in to comment.