Fix and prettify comments

This commit is contained in:
oxalica 2020-09-12 00:12:42 +08:00
parent 251ef93ac3
commit cc4e287bb5
No known key found for this signature in database
GPG Key ID: CED392DE0C483D00

View File

@ -202,8 +202,12 @@ fn opaque_ty_data(&self, id: chalk_ir::OpaqueTyId<Interner>) -> Arc<OpaqueTyDatu
Some((trait_, alias))
})
{
// AsyncBlock<T>: Future</* Self */>
// This is required by `fn impls_future` to check if we need to provide `.await` completion.
// Making up `AsyncBlock<T>: Future<Output = T>`
//
// |--------------------OpaqueTyDatum-------------------|
// |-------------OpaqueTyDatumBound--------------|
// for<T> <Self> [Future<Self>, Future::Output<Self> = T]
// ^1 ^0 ^0 ^0 ^1
let impl_bound = GenericPredicate::Implemented(TraitRef {
trait_: future_trait,
// Self type as the first parameter.
@ -212,8 +216,6 @@ fn opaque_ty_data(&self, id: chalk_ir::OpaqueTyId<Interner>) -> Arc<OpaqueTyDatu
index: 0,
})),
});
// AsyncBlock<T>: Future</* Self, */ Output = T>;
// debruijn: ^1 ^0
let proj_bound = GenericPredicate::Projection(ProjectionPredicate {
// The parameter of the opaque type.
ty: Ty::Bound(BoundVar { debruijn: DebruijnIndex::ONE, index: 0 }),