about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-17 04:45:15 +0000
committerbors <bors@rust-lang.org>2023-02-17 04:45:15 +0000
commit9556b56dbdbd4238f0051e7230004b0aa488fa14 (patch)
tree239e87d32d56548dd262905ead28de9f0500fa8c /compiler/rustc_middle/src/query
parentea218392a4ce119c4dfcd8fb94a7fee77f76f2c5 (diff)
parentf6c3469aa2f445c0eb4a7598175cba969ef4b948 (diff)
downloadrust-9556b56dbdbd4238f0051e7230004b0aa488fa14.tar.gz
rust-9556b56dbdbd4238f0051e7230004b0aa488fa14.zip
Auto merge of #107753 - kylematsuda:type-of, r=BoxyUwU
Switch to `EarlyBinder` for `type_of` query

Part of the work to finish #105779 and implement https://github.com/rust-lang/types-team/issues/78.

Several queries `X` have a `bound_X` variant that wraps the output in `EarlyBinder`. This adds `EarlyBinder` to the return type of the `type_of` query and removes `bound_type_of`.

r? `@lcnr`
Diffstat (limited to 'compiler/rustc_middle/src/query')
-rw-r--r--compiler/rustc_middle/src/query/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 6f878a955fa..1ccad25fe08 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -152,7 +152,7 @@ rustc_queries! {
     /// 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> {
+    query type_of(key: DefId) -> ty::EarlyBinder<Ty<'tcx>> {
         desc { |tcx|
             "{action} `{path}`",
             action = {