Skip to content

Commit 675dae4

Browse files
committed
[more comments and fixmes]
1 parent 697b910 commit 675dae4

File tree

1 file changed

+6
-1
lines changed
  • compiler/rustc_hir_analysis/src/astconv

1 file changed

+6
-1
lines changed

compiler/rustc_hir_analysis/src/astconv/bounds.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
401401
let bound_vars = tcx.late_bound_vars(binding.hir_id);
402402
ty::Binder::bind_with_vars(subst_output, bound_vars)
403403
} 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`.
405405
candidate.map_bound(|trait_ref| {
406406
let ident = Ident::new(assoc_item.name, binding.ident.span);
407407
let item_segment = hir::PathSegment {
@@ -421,6 +421,9 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
421421

422422
debug!(?args_trait_ref_and_assoc_item);
423423

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".
424427
ty::AliasTy::new(tcx, assoc_item.def_id, args_trait_ref_and_assoc_item)
425428
})
426429
};
@@ -437,6 +440,8 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
437440
hir::Term::Const(ct) => ty::Const::from_anon_const(tcx, ct.def_id).into(),
438441
};
439442

443+
// FIXME(fmease): Is this strictly necessary for `Term::Const`?
444+
// If so, update the diagnostics, otherwise, skip this check.
440445
if !speculative {
441446
// Find any late-bound regions declared in `ty` that are not
442447
// declared in the trait-ref or assoc_item. These are not well-formed.

0 commit comments

Comments
 (0)