about summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2019-06-19Rollup merge of #61547 - petrochenkov:cfgen, r=CentrilMazdak Farrokhzad-3/+3
Support `cfg` and `cfg_attr` on generic parameters `cfg` attributes are supported in all other positions where attributes are accepted at all. They were previously prohibited in https://github.com/rust-lang/rust/pull/51283 because they weren't implemented correctly before that and were simply ignored.
2019-06-19Support `cfg` and `cfg_attr` on generic parametersVadim Petrochenkov-3/+3
2019-06-19Rollup merge of #61898 - petrochenkov:sekind, r=eddybMazdak Farrokhzad-245/+134
syntax: Factor out common fields from `SyntaxExtension` variants And some other related cleanups. Continuation of https://github.com/rust-lang/rust/pull/61606. This will also help to unblock https://github.com/rust-lang/rust/pull/61877.
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-5/+5
2019-06-18resolve/expand: Move expansion info setting to a single earlier pointVadim Petrochenkov-30/+4
2019-06-18syntax: Move `default_transparency` into `ExpnInfo`Vadim Petrochenkov-1/+2
2019-06-18syntax: Introduce `default`/`with_unstable` constructors for `ExpnInfo`Vadim Petrochenkov-9/+4
2019-06-18syntax: Remove `DummyResolver`Vadim Petrochenkov-25/+0
2019-06-18syntax: Factor out common fields from `SyntaxExtension` variantsVadim Petrochenkov-198/+142
2019-06-16Rollup merge of #61866 - sinkuu:redundant_clone, r=petrochenkovMazdak Farrokhzad-2/+3
Remove redundant `clone()`s
2019-06-15Rollup merge of #61813 - matthewjasper:remove-unnecessary-symbol-ops, ↵Mazdak Farrokhzad-11/+11
r=petrochenkov Remove some unnecessary symbol interner ops * Don't gensym symbols that don't need to worry about colliding with other symbols * Use symbol constants instead of interning string literals in a few places. * Don't generate a module in `__register_diagnostic` r? @petrochenkov
2019-06-15Use `slice::from_ref` instead of cloningShotaro Yamada-2/+3
2019-06-14Avoid some unnecessary symbol interner operationsMatthew Jasper-11/+11
2019-06-12Auto merge of #60669 - c410-f3r:attrs-fn, r=petrochenkovbors-2/+8
Allow attributes in formal function parameters Implements https://github.com/rust-lang/rust/issues/60406. This is my first contribution to the compiler and since this is a large and complex project, I am not fully aware of the consequences of the changes I have made. **TODO** - [x] Forbid some built-in attributes. - [x] Expand cfg/cfg_attr
2019-06-10syntax: Rename variants of `SyntaxExtension` for consistencyVadim Petrochenkov-45/+41
2019-06-10syntax: Improve documentation of `SyntaxExtension`Vadim Petrochenkov-36/+54
2019-06-10syntax: Remove `SyntaxExtension::DeclMacro`Vadim Petrochenkov-77/+61
It's a less powerful duplicate of `SyntaxExtension::NormalTT`
2019-06-10syntax: Use `MultiItemModifier` for built-in derivesVadim Petrochenkov-25/+22
2019-06-10syntax: Remove `SyntaxExtension::MultiDecorator` and `MultiItemDecorator`Vadim Petrochenkov-43/+1
2019-06-10syntax: Remove `SyntaxExtension::IdentTT` and `IdentMacroExpander`Vadim Petrochenkov-60/+0
2019-06-09Allow attributes in formal function parametersCaio-2/+8
2019-06-09pacify tidy.Mazdak Farrokhzad-1/+1
2019-06-09Some more cleanup in libsyntax::ext::tt::quotedMazdak Farrokhzad-11/+8
2019-06-09Cleanups in parse_sep_and_kleene_op.Mazdak Farrokhzad-12/+4
2019-06-09Support ? Kleene operator in 2015.Mazdak Farrokhzad-167/+4
2019-06-09Rollup merge of #61669 - petrochenkov:tokderef2, r=oli-obkMazdak Farrokhzad-66/+51
syntax: Remove `Deref` impl from `Token` Follow up to https://github.com/rust-lang/rust/pull/61541 r? @oli-obk
2019-06-09Rollup merge of #61646 - L117:master, r=CentrilMazdak Farrokhzad-15/+15
Remove useless allocations in macro_rules follow logic. Closes #61543
2019-06-08syntax: Remove `Deref` impl from `Token`Vadim Petrochenkov-23/+13
2019-06-08syntax: Move most of the `TokenKind` methods to `Token`Vadim Petrochenkov-9/+9
2019-06-08syntax: Keep full `Token`s for `macro_rules` separatorsVadim Petrochenkov-35/+30
2019-06-08Remove useless allocations in macro_rules follow logic.L117-15/+15
2019-06-07parser: `self.span` -> `self.token.span`Vadim Petrochenkov-11/+11
2019-06-06Address review commentsVadim Petrochenkov-12/+9
2019-06-06Some code cleanup and tidy/test fixesVadim Petrochenkov-21/+22
2019-06-06syntax: Switch function parameter order in `TokenTree::token`Vadim Petrochenkov-18/+19
2019-06-06syntax: Remove duplicate span from `token::Ident`Vadim Petrochenkov-32/+26
2019-06-06syntax: Remove duplicate span from `token::Lifetime`Vadim Petrochenkov-2/+2
2019-06-06syntax: Add some helper methods to `Token`Vadim Petrochenkov-8/+7
2019-06-06syntax: Use `Token` in `Parser`Vadim Petrochenkov-17/+16
2019-06-06syntax: Use `Token` in `TokenTree::Token`Vadim Petrochenkov-69/+74
2019-06-06syntax: Rename `Token` into `TokenKind`Vadim Petrochenkov-21/+21
2019-06-06Always use token kinds through `token` module rather than `Token` typeVadim Petrochenkov-23/+23
2019-06-05Implemented for function bounds, type bounds, and named existential types.Alexander Regueiro-8/+8
2019-06-05Aggregation of drive-by cosmetic changes.Alexander Regueiro-18/+15
2019-06-03syntax: revert `ast::AsyncArgument` and associated changes.Eduard-Mihai Burtescu-25/+4
Here follows the main reverts applied in order to make this commit: Revert "Rollup merge of #60676 - davidtwco:issue-60674, r=cramertj" This reverts commit 45b09453dbf120cc23d889435aac3ed7d2ec8eb7, reversing changes made to f6df1f6c30b469cb9e65c5453a0efa03cbb6005e. Revert "Rollup merge of #60437 - davidtwco:issue-60236, r=nikomatsakis" This reverts commit 16939a50ea440e72cb6ecefdaabb988addb1ec0e, reversing changes made to 12bf98155249783583a91863c5dccf9e346f1226. Revert "Rollup merge of #59823 - davidtwco:issue-54716, r=cramertj" This reverts commit 62d1574876f5531bce1b267e62dff520d7adcbbb, reversing changes made to 4eff8526a789e0dfa8b97f7dec91b7b5c18e8544.
2019-05-29Introduce and use `SyntaxContext::outer_expn_info()`.Nicholas Nethercote-1/+1
It reduces two `hygiene_data` accesses to one on some hot paths.
2019-05-27Auto merge of #61140 - estebank:attr-diagnostics, r=michaelwoeristerbors-2/+8
Reword malformed attribute input diagnostics - Handle empty `cfg_attr` attribute - Reword empty `derive` attribute error - Use consistend error message: "malformed `attrname` attribute input" - Provide suggestions when possible - Move note/help to label/suggestion - Use consistent wording "ill-formed" -> "malformed" - Move diagnostic logic out of parser Split up from https://github.com/rust-lang/rust/pull/61026, where there's prior conversation.
2019-05-27Use `Symbol` equality in `may_begin_with` and `parse_nt`.Nicholas Nethercote-27/+27
2019-05-27Pass symbols to `ExtCtxt::std_path` instead of strings.Nicholas Nethercote-26/+16
Because this function is hot. Also remove the dead `ty_option` function.
2019-05-27Avoid unnecessary internings.Nicholas Nethercote-7/+4
Most involving `Symbol::intern` on string literals.