hir: Simplify hir_owner_nodes
query
The query accept arbitrary DefIds, not just owner DefIds. The return can be an `Option` because if there are no nodes, then it doesn't matter whether it's due to NonOwner or Phantom. Also rename the query to `opt_hir_owner_nodes`.
This commit is contained in:
parent
c401f09979
commit
64b6b5b6ce
40 changed files with 862 additions and 867 deletions
|
@ -452,7 +452,7 @@ fn get_body_span<'tcx>(
|
|||
fn hash_mir_source<'tcx>(tcx: TyCtxt<'tcx>, hir_body: &'tcx rustc_hir::Body<'tcx>) -> u64 {
|
||||
// FIXME(cjgillot) Stop hashing HIR manually here.
|
||||
let owner = hir_body.id().hir_id.owner;
|
||||
tcx.hir_owner_nodes(owner)
|
||||
tcx.opt_hir_owner_nodes(owner)
|
||||
.unwrap()
|
||||
.opt_hash_including_bodies
|
||||
.unwrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue