diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-03 11:07:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-03 11:07:05 +0100 |
| commit | cf937fa84d98d04642fd855d8daf65430ae48bb3 (patch) | |
| tree | d078e53e048e0c7a216faaf4227787d08b22e675 /src/libsyntax_expand/parse | |
| parent | 01345d65c119f48aa5e62acd9a88c7079186024e (diff) | |
| parent | 498737c8e9cf52be1bde3bef7ffa24a3d0540257 (diff) | |
| download | rust-cf937fa84d98d04642fd855d8daf65430ae48bb3.tar.gz rust-cf937fa84d98d04642fd855d8daf65430ae48bb3.zip | |
Rollup merge of #66935 - petrochenkov:attrtok2, r=Centril
syntax: Unify macro and attribute arguments in AST The unified form (`ast::MacArgs`) represents parsed arguments instead of an unstructured token stream that was previously used for attributes. It also tracks some spans and delimiter kinds better for fn-like macros and macro definitions. I've been talking about implementing this with @nnethercote in https://github.com/rust-lang/rust/pull/65750#issuecomment-546517322. The parsed representation is closer to `MetaItem` and requires less token juggling during conversions, so it potentially may be faster. r? @Centril
Diffstat (limited to 'src/libsyntax_expand/parse')
| -rw-r--r-- | src/libsyntax_expand/parse/tests.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax_expand/parse/tests.rs b/src/libsyntax_expand/parse/tests.rs index 08950ddefba..30e83c151e2 100644 --- a/src/libsyntax_expand/parse/tests.rs +++ b/src/libsyntax_expand/parse/tests.rs @@ -272,7 +272,7 @@ fn ttdelim_span() { "foo!( fn main() { body } )".to_string(), &sess).unwrap(); let tts: Vec<_> = match expr.kind { - ast::ExprKind::Mac(ref mac) => mac.stream().trees().collect(), + ast::ExprKind::Mac(ref mac) => mac.args.inner_tokens().trees().collect(), _ => panic!("not a macro"), }; |
