rust/compiler/rustc_expand/src
Aaron Hill de88bf148b
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`.
2020-11-26 17:08:35 -05:00
..
mbe rustc_ast: visit_mac -> visit_mac_call 2020-11-03 23:39:51 +03:00
mut_visit rustc_ast: visit_mac -> visit_mac_call 2020-11-03 23:39:51 +03:00
parse Move lexer unit tests to rustc_lexer 2020-08-30 19:53:36 +02:00
tokenstream mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
base.rs Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
build.rs Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
config.rs expand: Move fully_configure to config.rs 2020-11-19 19:25:20 +03:00
expand.rs Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
lib.rs Remove redundant #![feature(...)] 's from compiler/ 2020-09-17 07:58:45 +02:00
mbe.rs Fix some more clippy warnings 2020-10-30 10:12:56 -04:00
module.rs Syntactically permit unsafety on mods 2020-09-10 06:56:33 -07:00
placeholders.rs Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
proc_macro_server.rs Rollup merge of #75146 - tmiasko:range-overflow, r=Mark-Simulacrum 2020-09-16 01:30:30 +02:00
proc_macro.rs Invoke attributes on the statement for statement items 2020-11-24 16:38:58 -05:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00