rust/compiler/rustc_parse/src/parser
Dylan DPC 30f39fee9d
Rollup merge of #82238 - petrochenkov:nocratemod, r=Aaron1011
ast: Keep expansion status for out-of-line module items

I.e. whether a module `mod foo;` is already loaded from a file or not.
This is a pre-requisite to correctly treating inner attributes on such modules (https://github.com/rust-lang/rust/issues/81661).

With this change AST structures for `mod` items diverge even more for AST structure for the crate root, which previously used `ast::Mod`.
Therefore this PR removes `ast::Mod` from `ast::Crate` in the first commit, these two things are sufficiently different from each other, at least at syntactic level.
Customization points for visiting a "`mod` item or crate root" were also removed from AST visitors (`fn visit_mod`).
`ast::Mod` itself was refactored away in the second commit in favor of `ItemKind::Mod(Unsafe, ModKind)`.
2021-02-19 02:49:08 +01:00
..
attr.rs Address review comments 2021-02-13 13:04:54 -05:00
attr_wrapper.rs Address review comments 2021-02-13 13:04:54 -05:00
diagnostics.rs Simplify pattern grammar by allowing nested leading vert 2021-02-15 12:07:54 -06:00
expr.rs Rollup merge of #82236 - matthiaskrgr:useless_conv, r=jyn514 2021-02-18 16:57:40 +01:00
generics.rs Require passing an AttrWrapper to collect_tokens_trailing_token 2021-02-13 12:07:15 -05:00
item.rs ast: Keep expansion status for out-of-line module items 2021-02-18 13:07:49 +03:00
mod.rs Simplify pattern grammar by allowing nested leading vert 2021-02-15 12:07:54 -06:00
nonterminal.rs Simplify pattern grammar by allowing nested leading vert 2021-02-15 12:07:54 -06:00
pat.rs Simplify pattern grammar by allowing nested leading vert 2021-02-15 12:07:54 -06:00
path.rs Point only at generic arguments when they are unexpected 2021-01-26 15:59:43 -08:00
stmt.rs Rollup merge of #82236 - matthiaskrgr:useless_conv, r=jyn514 2021-02-18 16:57:40 +01:00
ty.rs Address review comments 2020-12-17 14:12:48 +01:00