Skip to content

Commit fbc45b6

Browse files
committed
Auto merge of rust-lang#95537 - GuillaumeGomez:type_of-doc, r=Dylan-DPC
Improve TyCtxt::type_of documentation r? `@oli-obk`
2 parents 07a461a + 6fdeee4 commit fbc45b6

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+4
-1
lines changed

compiler/rustc_middle/src/query/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ rustc_queries! {
124124
separate_provide_extern
125125
}
126126

127-
/// Records the type of every item.
127+
/// Returns the [`Ty`][rustc_middle::ty::Ty] of the given [`DefId`]. If the [`DefId`] points
128+
/// to an alias, it will "skip" this alias to return the aliased type.
129+
///
130+
/// [`DefId`]: rustc_hir::def_id::DefId
128131
query type_of(key: DefId) -> Ty<'tcx> {
129132
desc { |tcx|
130133
"{action} `{path}`",

0 commit comments

Comments
 (0)