From 1c1ce2fbda9c5d385fcb222d98d948aa4616fe91 Mon Sep 17 00:00:00 2001 From: kadmin Date: Thu, 13 Jan 2022 07:39:58 +0000 Subject: Add term to ExistentialProjection Also prevent ICE when adding a const in associated const equality. --- compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_codegen_ssa/src/debuginfo') diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index 61322a6e556..9687fd09a53 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -203,8 +203,9 @@ fn push_debuginfo_type_name<'tcx>( let projection_bounds: SmallVec<[_; 4]> = trait_data .projection_bounds() .map(|bound| { - let ExistentialProjection { item_def_id, ty, .. } = bound.skip_binder(); - (item_def_id, ty) + let ExistentialProjection { item_def_id, term, .. } = bound.skip_binder(); + // FIXME(associated_const_equality): allow for consts here + (item_def_id, term.ty().unwrap()) }) .collect(); -- cgit 1.4.1-3-g733a5