about summary refs log tree commit diff
path: root/src/test/ui/ast-json
AgeCommit message (Collapse)AuthorLines
2021-09-02Bless ast-json tests.Camille GILLOT-2/+2
2021-08-15Fix ui tests for llvm_asm! deprecationAmanieu d'Antras-0/+1
2021-02-25Update test output for edition preludes.Mara Bos-1/+1
2021-02-18ast: Stop using `Mod` in `Crate`Vadim Petrochenkov-2/+2
Crate root is sufficiently different from `mod` items, at least at syntactic level. Also remove customization point for "`mod` item or crate root" from AST visitors.
2021-01-24parser: Collect tokens for values in key-value attributesVadim Petrochenkov-2/+2
2021-01-09ast: Remove some indirection layers from values in key-value attributesVadim Petrochenkov-2/+2
2020-12-09Accept arbitrary expressions in key-value attributes at parse timeVadim Petrochenkov-2/+2
2020-11-09Do not collect tokens for doc commentsVadim Petrochenkov-2/+2
2020-11-01Do not remove tokens before AST json serializationVadim Petrochenkov-55/+25
2020-10-29Strip tokens from trait and impl items before printing AST JSONAaron Hill-0/+34
Fixes #78510
2020-10-26Remove tokens from foreign items in `TokenStripper`Aaron Hill-0/+19
Fixes #78398 I forgot to handle this case in #77255
2020-10-21Strip tokens before printing AST JSONAaron Hill-2/+2
2020-10-21Unconditionally capture tokens for attributes.Aaron Hill-2/+2
This allows us to avoid synthesizing tokens in `prepend_attr`, since we have the original tokens available. We still need to synthesize tokens when expanding `cfg_attr`, but this is an unavoidable consequence of the syntax of `cfg_attr` - the user does not supply the `#` and `[]` tokens that a `cfg_attr` expands to.
2020-09-10Fully integrate token collection for additional AST structsAaron Hill-2/+2
This commit contains miscellaneous changes that don't fit into any of the other commits in this PR
2020-09-10Syntactically permit unsafety on modsDavid Tolnay-2/+2
2020-09-03Rename IsJoint -> SpacingAleksey Kladov-2/+2
To match better naming from proc-macro
2020-08-14Fix tests and address review commentsMatthew Jasper-2/+2
2020-05-25Only capture tokens for items with outer attributesAaron Hill-2/+2
Suggested by @petrochenkov in https://github.com/rust-lang/rust/issues/43081#issuecomment-633389225
2020-05-22Rewrite `Parser::collect_tokens`Aaron Hill-2/+2
The previous implementation did not work when called on an opening delimiter, or when called re-entrantly from the same `TokenCursor` stack depth.
2020-04-19check '-Zast-json' & '-Zast-json-noexpand' to output legal JSONJOE1994-2/+14
2020-03-26Update tests to use llvm_asm!Amanieu d'Antras-2/+2
2020-02-15Record proc macro harness order for use during metadata deserializationAaron Hill-1/+1
Fixes #68690 When we generate the proc macro harness, we now explicitly recorder the order in which we generate entries. We then use this ordering data to deserialize the correct proc-macro-data from the crate metadata.
2019-11-11syntactically allow visibility on trait item & enum variantMazdak Farrokhzad-1/+1
2019-10-21Derive `Rustc{En,De}codable` for `TokenStream`.Nicholas Nethercote-1/+1
`TokenStream` used to be a complex type, but it is now just a newtype around a `Lrc<Vec<TreeAndJoint>>`. Currently it uses custom encoding that discards the `IsJoint` and custom decoding that adds `NonJoint` back in for every token tree. This requires building intermediate `Vec<TokenTree>`s. This commit makes `TokenStream` derive `Rustc{En,De}codable`. This simplifies the code, and avoids the creation of the intermediate vectors, saving up to 3% on various benchmarks. It also changes the AST JSON output in one test.
2019-09-26Fix AST JSON output testvarkor-1/+1
2019-08-27Add default serialization for `Ident`sMatthew Jasper-0/+51
Add tests for -Zast-json and -Zast-json-noexpand, which need this impl.