rust/compiler/rustc_builtin_macros/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
..
deriving Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
format_foreign
asm.rs rustc_parse: Make Parser::unexpected public and use it in built-in macros 2020-10-06 00:23:36 +03:00
assert.rs Small cleanups in assert!() and panic_fmt lint. 2020-10-19 21:14:05 +02:00
cfg.rs
cfg_accessible.rs expand: Tell built-in macros whether we are currently in forced expansion mode 2020-11-19 19:25:20 +03:00
cmdline_attrs.rs Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
compile_error.rs
concat.rs
concat_idents.rs expand: Stop un-interpolating NtIdents before passing them to built-in macros 2020-09-28 23:10:44 +03:00
env.rs
format.rs Point at named argument not found when using format_args_capture instead of whole format string 2020-09-08 10:10:45 -07:00
format_foreign.rs Reduce boilerplate with the ? operator 2020-11-23 00:58:53 +01:00
global_allocator.rs Handle Annotatable::Stmt in some builtin macros 2020-11-24 14:04:32 -05:00
global_asm.rs Attach TokenStream to ast::Visibility 2020-09-10 17:33:06 -04:00
lib.rs /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
llvm_asm.rs
log_syntax.rs
proc_macro_harness.rs rustc_ast: Do not panic by default when visiting macro calls 2020-11-03 20:38:20 +03:00
source_util.rs Remove extra indirection in LitKind::ByteStr 2020-10-04 15:52:15 -06:00
standard_library_imports.rs cleanup: Remove ParseSess::injected_crate_name 2020-11-13 00:59:57 +03:00
test.rs Handle Annotatable::Stmt in some builtin macros 2020-11-24 14:04:32 -05:00
test_harness.rs Changed unwrap_or to unwrap_or_else in some places. 2020-11-10 20:07:47 -08:00
trace_macros.rs
util.rs