[−][src]Function syntax::ext::tt::macro_rules::frag_can_be_followed_by_any
fn frag_can_be_followed_by_any(frag: &str) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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).