diff options
| author | bors <bors@rust-lang.org> | 2020-11-28 07:48:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-28 07:48:56 +0000 |
| commit | 4ae328bef47dffcbf363e5ae873f419c06a5511d (patch) | |
| tree | a4638ba9c7a64bae7fa30ec681219ef1a00dc3d3 /src/test/rustdoc/through-proc-macro.rs | |
| parent | f8e5209a21c698398a0f8c04af55e2ad6cbd113c (diff) | |
| parent | 92bfa05b07090be1b3bf32af0c8947a0f0b387e8 (diff) | |
| download | rust-4ae328bef47dffcbf363e5ae873f419c06a5511d.tar.gz rust-4ae328bef47dffcbf363e5ae873f419c06a5511d.zip | |
Auto merge of #78296 - Aaron1011:fix/stmt-tokens, r=petrochenkov
Properly handle attributes on statements
We now collect tokens for the underlying node wrapped by `StmtKind`
nstead of storing tokens directly in `Stmt`.
`LazyTokenStream` now supports capturing a trailing semicolon after it
is initially constructed. This allows us to avoid refactoring statement
parsing to wrap the parsing of the semicolon in `parse_tokens`.
Attributes on item statements
(e.g. `fn foo() { #[bar] struct MyStruct; }`) are now treated as
item attributes, not statement attributes, which is consistent with how
we handle attributes on other kinds of statements. The feature-gating
code is adjusted so that proc-macro attributes are still allowed on item
statements on stable.
Two built-in macros (`#[global_allocator]` and `#[test]`) needed to be
adjusted to support being passed `Annotatable::Stmt`.
Diffstat (limited to 'src/test/rustdoc/through-proc-macro.rs')
0 files changed, 0 insertions, 0 deletions
