diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2019-05-08 15:58:42 -0400 |
|---|---|---|
| committer | Alexander Regueiro <alexreg@me.com> | 2019-06-05 21:09:32 +0100 |
| commit | 963e22c38c97f342338b9d93ca5be58418fb535f (patch) | |
| tree | b007c289012a9710863223ff717f3ae059bc87f7 | |
| parent | 2cdd7f8387bf1dc08bbd1c11abd83cb1f892e6cd (diff) | |
| download | rust-963e22c38c97f342338b9d93ca5be58418fb535f.tar.gz rust-963e22c38c97f342338b9d93ca5be58418fb535f.zip | |
added a few comments
| -rw-r--r-- | src/librustc_typeck/astconv.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 4a2949fa6b0..92c5df72d8c 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -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 /// an implicit `Self`, if this is a trait reference), returns the complete /// 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. fn create_substs_for_ast_path<'a>(&self, @@ -1091,6 +1092,10 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o { }), binding.span)); } 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 // `instantiate_poly_trait_ref`. let param_ty = tcx.mk_projection(assoc_ty.def_id, candidate.skip_binder().substs); |
