about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src
AgeCommit message (Collapse)AuthorLines
2020-09-28expand: Stop un-interpolating `NtIdent`s before passing them to built-in macrosVadim Petrochenkov-8/+8
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.
2020-09-26Auto merge of #76485 - estebank:format_arg_capture_spans, r=davidtwcobors-3/+6
Point at named argument not found when using `format_args_capture` instead of whole format string
2020-09-25Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514Jonas Schievink-1/+1
Updated html_root_url for compiler crates Closes #77103 r? @jyn514
2020-09-23/nightly/nightly-rustcErik Hofmayer-1/+1
2020-09-23Updated html_root_url for compiler cratesErik Hofmayer-1/+1
2020-09-23Merge two almost identical match armsLingMan-2/+1
2020-09-18use matches!() macro for simple if let conditionsMatthias Krüger-1/+1
2020-09-10Attach tokens to `ast::Stmt`Aaron Hill-1/+1
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.
2020-09-10Attach `TokenStream` to `ast::Visibility`Aaron Hill-14/+26
A `Visibility` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-10Attach tokens to `NtMeta` (`ast::AttrItem`)Aaron Hill-1/+1
An `AttrItem` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-10Attach `TokenStream` to `ast::Ty`Aaron Hill-0/+1
A `Ty` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-10Attach `TokenStream` to `ast::Block`Aaron Hill-0/+1
A `Block` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
2020-09-10use push(char) instead of push_str(&str) to add single chars to stringsMatthias Krüger-6/+6
clippy::single-char-push-str
2020-09-08Point at named argument not found when using `format_args_capture` instead ↵Esteban Küber-3/+6
of whole format string
2020-09-02Improve recovery on malformed format callSasha-8/+20
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.
2020-08-30Use string literal directly when available in formatSasha-1/+20
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.
2020-08-30mv compiler to compiler/mark-0/+9614