rustc: hir().local_def_id_to_hir_id()
-> tcx.local_def_id_to_hir_id()
cleanup
This commit is contained in:
parent
9529a5d265
commit
c697927f44
110 changed files with 189 additions and 199 deletions
|
@ -94,7 +94,7 @@ fn impl_item_implementor_ids(tcx: TyCtxt<'_>, impl_id: DefId) -> DefIdMap<DefId>
|
|||
}
|
||||
|
||||
fn associated_item(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::AssocItem {
|
||||
let id = tcx.hir().local_def_id_to_hir_id(def_id);
|
||||
let id = tcx.local_def_id_to_hir_id(def_id);
|
||||
let parent_def_id = tcx.hir().get_parent_item(id);
|
||||
let parent_item = tcx.hir().expect_item(parent_def_id.def_id);
|
||||
match parent_item.kind {
|
||||
|
|
|
@ -81,8 +81,8 @@ impl<'tcx> OpaqueTypeCollector<'tcx> {
|
|||
/// For the above example, this function returns `true` for `f1` and `false` for `f2`.
|
||||
#[instrument(level = "trace", skip(self), ret)]
|
||||
fn check_tait_defining_scope(&self, opaque_def_id: LocalDefId) -> bool {
|
||||
let mut hir_id = self.tcx.hir().local_def_id_to_hir_id(self.item);
|
||||
let opaque_hir_id = self.tcx.hir().local_def_id_to_hir_id(opaque_def_id);
|
||||
let mut hir_id = self.tcx.local_def_id_to_hir_id(self.item);
|
||||
let opaque_hir_id = self.tcx.local_def_id_to_hir_id(opaque_def_id);
|
||||
|
||||
// Named opaque types can be defined by any siblings or children of siblings.
|
||||
let scope = self.tcx.hir().get_defining_scope(opaque_hir_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue