Function syntax::ext::tt::macro_rules::is_in_follow [−][src]
fn is_in_follow(
tok: &TokenTree,
frag: &str
) -> Result<bool, (String, &'static str)>
🔬 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 frag
can legally be followed by the token tok
. For
fragments that can consume an unbounded number of tokens, tok
must be within a well-defined follow set. This is intended to
guarantee future compatibility: for example, without this rule, if
we expanded expr
to include a new binary operator, we might
break macros that were relying on that binary operator as a
separator.