added a few comments
This commit is contained in:
parent
2cdd7f8387
commit
963e22c38c
1 changed files with 5 additions and 0 deletions
|
@ -571,6 +571,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
|
||||||
/// Given the type/lifetime/const arguments provided to some path (along with
|
/// Given the type/lifetime/const arguments provided to some path (along with
|
||||||
/// an implicit `Self`, if this is a trait reference), returns the complete
|
/// an implicit `Self`, if this is a trait reference), returns the complete
|
||||||
/// set of substitutions. This may involve applying defaulted type parameters.
|
/// set of substitutions. This may involve applying defaulted type parameters.
|
||||||
|
/// Also returns back constriants on associated types.
|
||||||
///
|
///
|
||||||
/// Note that the type listing given here is *exactly* what the user provided.
|
/// Note that the type listing given here is *exactly* what the user provided.
|
||||||
fn create_substs_for_ast_path<'a>(&self,
|
fn create_substs_for_ast_path<'a>(&self,
|
||||||
|
@ -1091,6 +1092,10 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
|
||||||
}), binding.span));
|
}), binding.span));
|
||||||
}
|
}
|
||||||
ConvertedBindingKind::Constraint(ref ast_bounds) => {
|
ConvertedBindingKind::Constraint(ref ast_bounds) => {
|
||||||
|
// "Desugar" a constraint like `T: Iterator<Item: Debug>` to
|
||||||
|
//
|
||||||
|
// `<T as Iterator>::Item: Debug`
|
||||||
|
//
|
||||||
// Calling `skip_binder` is okay, because the predicates are re-bound later by
|
// Calling `skip_binder` is okay, because the predicates are re-bound later by
|
||||||
// `instantiate_poly_trait_ref`.
|
// `instantiate_poly_trait_ref`.
|
||||||
let param_ty = tcx.mk_projection(assoc_ty.def_id, candidate.skip_binder().substs);
|
let param_ty = tcx.mk_projection(assoc_ty.def_id, candidate.skip_binder().substs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue