rust/compiler/rustc_passes/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
..
liveness Move RWUTable to a separate module 2020-12-09 00:00:00 +00:00
check_attr.rs Only store a LocalDefId in hir::MacroDef. 2021-02-15 19:35:55 +01:00
check_const.rs replace if-let and while-let with if let and while let 2021-02-17 19:26:38 +09:00
dead.rs Only store a LocalDefId in hir::ForeignItem. 2021-02-15 19:32:29 +01:00
diagnostic_items.rs Use less HirId when referring to items. 2021-02-15 19:36:12 +01:00
entry.rs Only store a LocalDefId in hir::Item. 2021-02-15 19:32:10 +01:00
hir_id_validator.rs Index Modules using their LocalDefId. 2021-02-15 19:32:30 +01:00
hir_stats.rs Rollup merge of #82238 - petrochenkov:nocratemod, r=Aaron1011 2021-02-19 02:49:08 +01:00
intrinsicck.rs Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
lang_items.rs Only store a LocalDefId in hir::ImplItem. 2021-02-15 19:32:29 +01:00
layout_test.rs Only store a LocalDefId in hir::Item. 2021-02-15 19:32:10 +01:00
lib.rs Validate use of parameters in naked functions 2020-11-25 00:00:00 +00:00
lib_features.rs
liveness.rs Add loop head span to hir 2021-01-21 21:41:46 -08:00
loops.rs Do not suggest using a break label when one is already present 2021-01-21 21:43:29 -08:00
naked_functions.rs Reintroduce hir::ExprKind::If 2021-01-07 18:54:12 -03:00
reachable.rs Only store a LocalDefId in hir::ImplItem. 2021-02-15 19:32:29 +01:00
region.rs Rename HIR UnOp variants 2021-02-09 11:39:20 +03:00
stability.rs Only store a LocalDefId in hir::MacroDef. 2021-02-15 19:35:55 +01:00
upvars.rs
weak_lang_items.rs This should address issue 81294. 2021-01-25 14:37:27 -05:00