Get rid of the hir_owner query.
This commit is contained in:
parent
92f2e0aa62
commit
b99c3ae6d6
7 changed files with 42 additions and 77 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue