Skip to content

Commit e48dd12

Browse files
nikomatsakisAlexander Regueiro
authored and
Alexander Regueiro
committed
another comment
1 parent 18d5085 commit e48dd12

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustc_typeck/astconv.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
941941
///
942942
/// It adds these `ast_bounds` into the `bounds` structure.
943943
///
944-
/// **A note on binders:** There is an implied binder around
944+
/// **A note on binders:** there is an implied binder around
945945
/// `param_ty` and `ast_bounds`. See `instantiate_poly_trait_ref`
946946
/// for more details.
947947
fn add_bounds(&self,
@@ -1017,6 +1017,12 @@ impl<'o, 'gcx: 'tcx, 'tcx> dyn AstConv<'gcx, 'tcx> + 'o {
10171017
bounds
10181018
}
10191019

1020+
/// Given an HIR binding like `Item = Foo` or `Item: Foo`, pushes the corresponding predicates
1021+
/// onto `bounds`.
1022+
///
1023+
/// **A note on binders:** given something like `T: for<'a> Iterator<Item = &'a u32>`, the
1024+
/// `trait_ref` here will be `for<'a> T: Iterator`. The `binding` data however is from *inside*
1025+
/// the binder (e.g., `&'a u32`) and hence may reference bound regions.
10201026
fn add_predicates_for_ast_type_binding(
10211027
&self,
10221028
hir_ref_id: hir::HirId,

0 commit comments

Comments
 (0)