rustc_expand::mbe::diagnostics

Function parse_failure_msg

source
pub(super) fn parse_failure_msg(
    tok: &Token,
    expected_token: Option<&Token>,
) -> Cow<'static, str>
Expand description

Generates an appropriate parsing failure message. For EOF, this is “unexpected end…”. For other tokens, this is “unexpected token…”.