Make local_def_id_to_hir_id query directly returh HirId

This commit is contained in:
Santiago Pastorino 2022-01-29 08:40:23 -03:00
parent 5a299a9903
commit bf1ca2e4b0
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
3 changed files with 10 additions and 8 deletions

View file

@ -60,7 +60,7 @@ rustc_queries! {
///
/// This can be conveniently accessed by methods on `tcx.hir()`.
/// Avoid calling this query directly.
query local_def_id_to_hir_id(key: LocalDefId) -> hir::MaybeOwner<()> {
query local_def_id_to_hir_id(key: LocalDefId) -> hir::HirId {
desc { |tcx| "HIR ID of `{}`", tcx.def_path_str(key.to_def_id()) }
}