diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-11-17 14:27:44 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-11-26 17:08:35 -0500 |
| commit | de88bf148b122b27ce48a4a6679c41c834d33019 (patch) | |
| tree | 03e4878aa34dfb1dec071adc58e2c494e9f04225 /src/test/ui/iterators/iter-count-overflow-debug.rs | |
| parent | 72da5a9d85a522b11e80d0fdd1fd95247d442604 (diff) | |
| download | rust-de88bf148b122b27ce48a4a6679c41c834d33019.tar.gz rust-de88bf148b122b27ce48a4a6679c41c834d33019.zip | |
Properly handle attributes on statements
We now collect tokens for the underlying node wrapped by `StmtKind`
instead 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/ui/iterators/iter-count-overflow-debug.rs')
0 files changed, 0 insertions, 0 deletions
