1
Fork 0

Rollup merge of #104194 - BoxyUwU:early_binder_docs, r=compiler-errors

`EarlyBinder` docs
This commit is contained in:
Manish Goregaokar 2022-11-10 10:47:41 -05:00 committed by GitHub
commit c6595ea22a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -506,6 +506,9 @@ impl<'tcx, T: TypeVisitable<'tcx>> TypeVisitable<'tcx> for &'tcx ty::List<T> {
}
}
/// Similar to [`super::Binder`] except that it tracks early bound generics, i.e. `struct Foo<T>(T)`
/// needs `T` substituted immediately. This type primarily exists to avoid forgetting to call
/// `subst`.
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
#[derive(Encodable, Decodable, HashStable)]
pub struct EarlyBinder<T>(pub T);