| Age | Commit message (Collapse) | Author | Lines |
|
This was a big hack, and built-in macros should be able to deal with `NtIdents` in the input by themselves like any other parser code.
|
|
Point at named argument not found when using `format_args_capture` instead of whole format string
|
|
Updated html_root_url for compiler crates
Closes #77103
r? @jyn514
|
|
|
|
|
|
|
|
|
|
We currently only attach tokens when parsing a `:stmt` matcher for a
`macro_rules!` macro. Proc-macro attributes on statements are still
unstable, and need additional work.
|
|
A `Visibility` does not have outer attributes, so we only capture tokens
when parsing a `macro_rules!` matcher
|
|
An `AttrItem` does not have outer attributes, so we only capture tokens
when parsing a `macro_rules!` matcher
|
|
A `Ty` does not have outer attributes, so we only capture tokens
when parsing a `macro_rules!` matcher
|
|
A `Block` does not have outer attributes, so we only capture tokens when
parsing a `macro_rules!` matcher
|
|
clippy::single-char-push-str
|
|
of whole format string
|
|
If a comma in a format call is replaced with a similar token, then we
emit an error and continue parsing, instead of stopping at this point.
|
|
Previous implementation used the `Parser::parse_expr` function in order
to extract the format expression. If the first comma following the
format expression was mistakenly replaced with a dot, then the next
format expression was eaten by the function, because it looked as a
syntactically valid expression, which resulted in incorrectly spanned
error messages.
The way the format expression is exctracted is changed: we first look at
the first available token in the first argument supplied to the
`format!` macro call. If it is a string literal, then it is promoted as
a format expression immediatly, otherwise we fall back to the original
`parse_expr`-related method.
This allows us to ensure that the parser won't consume too much tokens
when a typo is made.
A test has been created so that it is ensured that the issue is properly
fixed.
|
|
|