Skip to content

Commit 4c197c0

Browse files
committedNov 9, 2022
docs
1 parent 0aaad9e commit 4c197c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎compiler/rustc_middle/src/ty/subst.rs

+3
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,9 @@ impl<'tcx, T: TypeVisitable<'tcx>> TypeVisitable<'tcx> for &'tcx ty::List<T> {
506506
}
507507
}
508508

509+
/// Similar to [`Binder`] except that it tracks early bound generics, i.e. `struct Foo<T>(T)`
510+
/// needs `T` substituted immediately. This type primarily exists to avoid forgetting to call
511+
/// `subst`.
509512
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
510513
#[derive(Encodable, Decodable, HashStable)]
511514
pub struct EarlyBinder<T>(pub T);

0 commit comments

Comments
 (0)
Please sign in to comment.