1
Fork 0

Get rid of the hir_owner query.

This commit is contained in:
Camille GILLOT 2024-01-15 22:31:02 +00:00
parent 92f2e0aa62
commit b99c3ae6d6
7 changed files with 42 additions and 77 deletions

View file

@ -841,7 +841,7 @@ pub struct OwnerNodes<'tcx> {
}
impl<'tcx> OwnerNodes<'tcx> {
fn node(&self) -> OwnerNode<'tcx> {
pub fn node(&self) -> OwnerNode<'tcx> {
use rustc_index::Idx;
let node = self.nodes[ItemLocalId::new(0)].as_ref().unwrap().node;
let node = node.as_owner().unwrap(); // Indexing must ensure it is an OwnerNode.