rust/compiler/rustc_middle/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
..
dep_graph Auto merge of #79216 - Aaron1011:opt-on-disk-cache, r=pnkfelix 2020-11-25 16:22:11 +00:00
hir Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
ich Rollup merge of #79036 - cjgillot:steal, r=oli-obk 2020-11-15 13:39:59 +01:00
infer words 2020-11-16 22:42:09 +01:00
middle stability: More precise location for deprecation lint on macros 2020-11-12 22:53:42 +03:00
mir Fix new 'unnecessary trailing semicolon' warnings 2020-11-26 17:08:36 -05:00
query Auto merge of #79411 - tmiasko:naked-params, r=Amanieu 2020-11-25 21:22:46 +00:00
traits Auto merge of #79336 - camelid:rename-feature-oibit-to-auto, r=oli-obk 2020-11-25 07:25:19 +00:00
ty Fix new 'unnecessary trailing semicolon' warnings 2020-11-26 17:08:36 -05:00
util Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
arena.rs Move Steal to rustc_data_structures. 2020-11-14 01:30:56 +01:00
lib.rs Introduce TypeVisitor::BreakTy 2020-11-14 20:25:27 +01:00
lint.rs Auto merge of #76931 - oli-obk:const_prop_inline_lint_madness, r=wesleywiser 2020-11-03 16:32:34 +00:00
macros.rs Auto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obk 2020-11-17 12:24:34 +00:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00