about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2022-03-31 21:03:52 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-04-02 13:57:27 +0200
commit6fdeee4be3c444550c0ef74dddcb75bf94ce80b1 (patch)
tree05cd7851df106010b4207b9a75a488b7347d2d2d
parentbb5c437a2ce9ccf2204c974300c5ea9eb32d3635 (diff)
downloadrust-6fdeee4be3c444550c0ef74dddcb75bf94ce80b1.tar.gz
rust-6fdeee4be3c444550c0ef74dddcb75bf94ce80b1.zip
Improve TyCtxt::type_of documentation
-rw-r--r--compiler/rustc_middle/src/query/mod.rs5
1 files changed, 4 insertions, 1 deletions
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}`",