Function rustc_expand::mbe::macro_rules::frag_can_be_followed_by_any

source ยท
fn frag_can_be_followed_by_any(kind: NonterminalKind) -> bool
Expand description

Returns true if a fragment of type frag can be followed by any sort of token. We use this (among other things) as a useful approximation for when frag can be followed by a repetition like $(...)* or $(...)+. In general, these can be a bit tricky to reason about, so we adopt a conservative position that says that any fragment specifier which consumes at most one token tree can be followed by a fragment specifier (indeed, these fragments can be followed by ANYTHING without fear of future compatibility hazards).