Skip to content

Commit c6595ea

Browse files
authoredNov 10, 2022
Rollup merge of #104194 - BoxyUwU:early_binder_docs, r=compiler-errors
`EarlyBinder` docs
2 parents 819c931 + 2566701 commit c6595ea

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 [`super::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.