From 217f5f6cfcb08cd74d7e17254acddbb21a65abd7 Mon Sep 17 00:00:00 2001 From: surechen Date: Tue, 26 Sep 2023 17:14:31 +0800 Subject: [PATCH] fixes #115497 --- compiler/rustc_hir_analysis/src/collect/generics_of.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_hir_analysis/src/collect/generics_of.rs b/compiler/rustc_hir_analysis/src/collect/generics_of.rs index a4c65f90e4699..c4d053c5d9f49 100644 --- a/compiler/rustc_hir_analysis/src/collect/generics_of.rs +++ b/compiler/rustc_hir_analysis/src/collect/generics_of.rs @@ -65,7 +65,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics { // struct Foo; // ^^^ ^ ^^^^^^ def id of this anon const // ^ ^ param_id - // ^ parent_def_id after + // ^ parent_def_id // // then we only want to return generics for params to the left of `N`. If we don't do that we // end up with that const looking like: `ty::ConstKind::Unevaluated(def_id, args: [N#0])`.