Skip to content

Commit 963e22c

Browse files
nikomatsakisAlexander Regueiro
authored and
Alexander Regueiro
committed
added a few comments
1 parent 2cdd7f8 commit 963e22c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_typeck/astconv.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
571571
/// Given the type/lifetime/const arguments provided to some path (along with
572572
/// an implicit `Self`, if this is a trait reference), returns the complete
573573
/// set of substitutions. This may involve applying defaulted type parameters.
574+
/// Also returns back constriants on associated types.
574575
///
575576
/// Note that the type listing given here is *exactly* what the user provided.
576577
fn create_substs_for_ast_path<'a>(&self,
@@ -1091,6 +1092,10 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
10911092
}), binding.span));
10921093
}
10931094
ConvertedBindingKind::Constraint(ref ast_bounds) => {
1095+
// "Desugar" a constraint like `T: Iterator<Item: Debug>` to
1096+
//
1097+
// `<T as Iterator>::Item: Debug`
1098+
//
10941099
// Calling `skip_binder` is okay, because the predicates are re-bound later by
10951100
// `instantiate_poly_trait_ref`.
10961101
let param_ty = tcx.mk_projection(assoc_ty.def_id, candidate.skip_binder().substs);

0 commit comments

Comments
 (0)