From 6fdeee4be3c444550c0ef74dddcb75bf94ce80b1 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 31 Mar 2022 21:03:52 +0200 Subject: [PATCH] Improve TyCtxt::type_of documentation --- compiler/rustc_middle/src/query/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 6d7e7ef0cb0..7e90ee63670 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -124,7 +124,10 @@ rustc_queries! { separate_provide_extern } - /// Records the type of every item. + /// Returns the [`Ty`][rustc_middle::ty::Ty] of the given [`DefId`]. If the [`DefId`] points + /// to an alias, it will "skip" this alias to return the aliased type. + /// + /// [`DefId`]: rustc_hir::def_id::DefId query type_of(key: DefId) -> Ty<'tcx> { desc { |tcx| "{action} `{path}`",