Auto merge of #120943 - petrochenkov:somehir3, r=oli-obk
Create some minimal HIR for associated opaque types `LocalDefId`s for opaque types in traits and impls are created after AST -> HIR lowering, so they don't have corresponding HIR and return their various properties through fed queries. In this PR I also feed some core HIR-related queries for these `LocalDefId`s (which happen to be HIR owners). As a result all `LocalDefId`s now have corresponding `HirId`s and HIR nodes, and "optional" methods like `opt_local_def_id_to_hir_id` and `opt_hir_node_by_def_id` can be removed. Follow up to https://github.com/rust-lang/rust/pull/120206.
This commit is contained in:
commit
fe61575228
16 changed files with 67 additions and 29 deletions
|
@ -356,7 +356,7 @@ pub fn late_lint_mod<'tcx, T: LateLintPass<'tcx> + 'tcx>(
|
|||
cached_typeck_results: Cell::new(None),
|
||||
param_env: ty::ParamEnv::empty(),
|
||||
effective_visibilities: tcx.effective_visibilities(()),
|
||||
last_node_with_lint_attrs: tcx.local_def_id_to_hir_id(module_def_id.into()),
|
||||
last_node_with_lint_attrs: tcx.local_def_id_to_hir_id(module_def_id),
|
||||
generics: None,
|
||||
only_module: true,
|
||||
};
|
||||
|
|
|
@ -191,6 +191,7 @@ fn shallow_lint_levels_on(tcx: TyCtxt<'_>, owner: hir::OwnerId) -> ShallowLintLe
|
|||
levels.add_id(hir::CRATE_HIR_ID);
|
||||
levels.visit_mod(mod_, mod_.spans.inner_span, hir::CRATE_HIR_ID)
|
||||
}
|
||||
hir::OwnerNode::AssocOpaqueTy(..) => unreachable!(),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue