about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/internal.rs
diff options
context:
space:
mode:
authorKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-02-06 17:48:12 -0700
committerKyle Matsuda <kyle.yoshio.matsuda@gmail.com>2023-02-16 17:01:52 -0700
commitd822b97a27e50f5a091d2918f6ff0ffd2d2827f5 (patch)
treedd0aae1c09476ba8d74e83999cadc77266ae2c20 /compiler/rustc_lint/src/internal.rs
parent9a7cc6c32f1a690f86827e4724bcda85e506ef35 (diff)
downloadrust-d822b97a27e50f5a091d2918f6ff0ffd2d2827f5.tar.gz
rust-d822b97a27e50f5a091d2918f6ff0ffd2d2827f5.zip
change usages of type_of to bound_type_of
Diffstat (limited to 'compiler/rustc_lint/src/internal.rs')
-rw-r--r--compiler/rustc_lint/src/internal.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs
index 6cefaea2bc7..72519085187 100644
--- a/compiler/rustc_lint/src/internal.rs
+++ b/compiler/rustc_lint/src/internal.rs
@@ -216,7 +216,7 @@ fn is_ty_or_ty_ctxt(cx: &LateContext<'_>, path: &Path<'_>) -> Option<String> {
         }
         // Only lint on `&Ty` and `&TyCtxt` if it is used outside of a trait.
         Res::SelfTyAlias { alias_to: did, is_trait_impl: false, .. } => {
-            if let ty::Adt(adt, substs) = cx.tcx.type_of(did).kind() {
+            if let ty::Adt(adt, substs) = cx.tcx.bound_type_of(did).subst_identity().kind() {
                 if let Some(name @ (sym::Ty | sym::TyCtxt)) = cx.tcx.get_diagnostic_name(adt.did())
                 {
                     // NOTE: This path is currently unreachable as `Ty<'tcx>` is