mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-02 19:58:26 +00:00
Skip query in get_parent_item when possible. For HirIds with a non-zero item local id, `self.parent_owner_iter(hir_id).next()` just returns the same HirId with the item local id set to 0, but also does a query to retrieve the Node which is ignored here, which seems wasteful.
For more information about how rustc works, see the rustc dev guide.