diff options
| author | bors <bors@rust-lang.org> | 2024-01-31 05:37:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-31 05:37:49 +0000 |
| commit | d53ddcd8bbb41cd977ab4f7a54886fd7779c0eba (patch) | |
| tree | 27dd14038cd56b8d966e89438bec154464855ca5 /compiler/rustc_middle/src/query | |
| parent | 80deabd0987201e1b8d060400f50e03309a0105e (diff) | |
| parent | db41f4aaa0c7a2506b02407c1b5183d84103d24b (diff) | |
| download | rust-d53ddcd8bbb41cd977ab4f7a54886fd7779c0eba.tar.gz rust-d53ddcd8bbb41cd977ab4f7a54886fd7779c0eba.zip | |
Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk
hir: Refactor getters for owner nodes
Diffstat (limited to 'compiler/rustc_middle/src/query')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index b383a6f5e52..2438f826441 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -190,11 +190,11 @@ rustc_queries! { desc { |tcx| "getting HIR parent of `{}`", tcx.def_path_str(key) } } - /// Gives access to the HIR nodes and bodies inside the HIR owner `key`. + /// Gives access to the HIR nodes and bodies inside `key` if it's a HIR owner. /// /// This can be conveniently accessed by methods on `tcx.hir()`. /// Avoid calling this query directly. - query hir_owner_nodes(key: hir::OwnerId) -> hir::MaybeOwner<&'tcx hir::OwnerNodes<'tcx>> { + query opt_hir_owner_nodes(key: LocalDefId) -> Option<&'tcx hir::OwnerNodes<'tcx>> { desc { |tcx| "getting HIR owner items in `{}`", tcx.def_path_str(key) } } |
