rust/compiler/rustc_ast_passes/src
bors 4ae328bef4 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`.
2020-11-28 07:48:56 +00:00
..
ast_validation.rs Auto merge of #79266 - b-naber:gat_trait_path_parser, r=petrochenkov 2020-11-27 00:18:24 +00:00
feature_gate.rs Rename optin_builtin_traits to auto_traits 2020-11-23 14:14:06 -08:00
lib.rs Bump recursion_limit in rustc_ast_passes 2020-11-27 15:47:58 -05:00
node_count.rs rustc_ast: visit_mac -> visit_mac_call 2020-11-03 23:39:51 +03:00
show_span.rs rustc_ast: Do not panic by default when visiting macro calls 2020-11-03 20:38:20 +03:00