rust/compiler/rustc_hir/src
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
..
arena.rs Retain assembly operands span when lowering AST to HIR 2020-12-06 20:48:08 +01:00
def.rs resolve: Reject ambiguity built-in attr vs different built-in attr 2021-01-17 01:48:17 +03:00
definitions.rs Iterate DefId to encode spans. 2021-01-23 13:44:02 +01:00
hir_id.rs Only store a LocalDefId in hir::Item. 2021-02-15 19:32:10 +01:00
hir.rs Rollup merge of #82238 - petrochenkov:nocratemod, r=Aaron1011 2021-02-19 02:49:08 +01:00
intravisit.rs Only store a LocalDefId in hir::MacroDef. 2021-02-15 19:35:55 +01:00
itemlikevisit.rs Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
lang_items.rs Rollup merge of #82066 - matthewjasper:trait-ref-fix, r=jackh726 2021-02-18 16:57:34 +01:00
lib.rs Stabilize feature(iterator_fold_self): Iterator::reduce 2021-02-04 11:31:11 +01:00
pat_util.rs Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
stable_hash_impls.rs Only store a LocalDefId in hir::MacroDef. 2021-02-15 19:35:55 +01:00
target.rs Visit more targets when checking attrs 2021-02-09 21:54:46 +01:00
weak_lang_items.rs This should address issue 81294. 2021-01-25 14:37:27 -05:00