@@ -401,7 +401,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
401
401
let bound_vars = tcx. late_bound_vars ( binding. hir_id ) ;
402
402
ty:: Binder :: bind_with_vars ( subst_output, bound_vars)
403
403
} else {
404
- // Append the generic arguments of the associated type to the `trait_ref`.
404
+ // Append the generic arguments of the associated type or const to the `trait_ref`.
405
405
candidate. map_bound ( |trait_ref| {
406
406
let ident = Ident :: new ( assoc_item. name , binding. ident . span ) ;
407
407
let item_segment = hir:: PathSegment {
@@ -421,6 +421,9 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
421
421
422
422
debug ! ( ?args_trait_ref_and_assoc_item) ;
423
423
424
+ // FIXME(fmease): Explain that we are indeed constructing an alias "type" for
425
+ // associated constants with feature `associated_const_equality` and that we
426
+ // call them "const projections".
424
427
ty:: AliasTy :: new ( tcx, assoc_item. def_id , args_trait_ref_and_assoc_item)
425
428
} )
426
429
} ;
@@ -437,6 +440,8 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
437
440
hir:: Term :: Const ( ct) => ty:: Const :: from_anon_const ( tcx, ct. def_id ) . into ( ) ,
438
441
} ;
439
442
443
+ // FIXME(fmease): Is this strictly necessary for `Term::Const`?
444
+ // If so, update the diagnostics, otherwise, skip this check.
440
445
if !speculative {
441
446
// Find any late-bound regions declared in `ty` that are not
442
447
// declared in the trait-ref or assoc_item. These are not well-formed.
0 commit comments