diff options
| author | bors <bors@rust-lang.org> | 2022-04-02 12:13:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-02 12:13:11 +0000 |
| commit | fbc45b650a9c517ca87b0af8f108efbf50689299 (patch) | |
| tree | 7cb7c0363a84171ae5a0f50cc8a1eada5387bab2 | |
| parent | 07a461ad52b8485b184397b453b5436c70f9f460 (diff) | |
| parent | 6fdeee4be3c444550c0ef74dddcb75bf94ce80b1 (diff) | |
Auto merge of #95537 - GuillaumeGomez:type_of-doc, r=Dylan-DPC
Improve TyCtxt::type_of documentation r? `@oli-obk`
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 5 |
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 14c11187fc5..89761bf4e27 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}`", |
