Index Modules using their LocalDefId.
This commit is contained in:
parent
7878fa70d6
commit
ff14cac621
10 changed files with 27 additions and 38 deletions
|
@ -59,7 +59,7 @@ pub fn impl_wf_check(tcx: TyCtxt<'_>) {
|
|||
// but it's one that we must perform earlier than the rest of
|
||||
// WfCheck.
|
||||
for &module in tcx.hir().krate().modules.keys() {
|
||||
tcx.ensure().check_mod_impl_wf(tcx.hir().local_def_id(module));
|
||||
tcx.ensure().check_mod_impl_wf(module);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -369,7 +369,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorReported> {
|
|||
tcx.sess.track_errors(|| {
|
||||
tcx.sess.time("type_collecting", || {
|
||||
for &module in tcx.hir().krate().modules.keys() {
|
||||
tcx.ensure().collect_mod_item_types(tcx.hir().local_def_id(module));
|
||||
tcx.ensure().collect_mod_item_types(module);
|
||||
}
|
||||
});
|
||||
})?;
|
||||
|
@ -401,7 +401,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorReported> {
|
|||
// NOTE: This is copy/pasted in librustdoc/core.rs and should be kept in sync.
|
||||
tcx.sess.time("item_types_checking", || {
|
||||
for &module in tcx.hir().krate().modules.keys() {
|
||||
tcx.ensure().check_mod_item_types(tcx.hir().local_def_id(module));
|
||||
tcx.ensure().check_mod_item_types(module);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue