From cc4e287bb519565e1d6d79d6e9bba19adbe9cc77 Mon Sep 17 00:00:00 2001 From: oxalica Date: Sat, 12 Sep 2020 00:12:42 +0800 Subject: Fix and prettify comments --- crates/hir_ty/src/traits/chalk.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crates/hir_ty/src/traits') diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs index 25e8ac186..ff364789e 100644 --- a/crates/hir_ty/src/traits/chalk.rs +++ b/crates/hir_ty/src/traits/chalk.rs @@ -202,8 +202,12 @@ impl<'a> chalk_solve::RustIrDatabase for ChalkContext<'a> { Some((trait_, alias)) }) { - // AsyncBlock: Future - // This is required by `fn impls_future` to check if we need to provide `.await` completion. + // Making up `AsyncBlock: Future` + // + // |--------------------OpaqueTyDatum-------------------| + // |-------------OpaqueTyDatumBound--------------| + // for [Future, Future::Output = 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 @@ impl<'a> chalk_solve::RustIrDatabase for ChalkContext<'a> { index: 0, })), }); - // AsyncBlock: Future; - // debruijn: ^1 ^0 let proj_bound = GenericPredicate::Projection(ProjectionPredicate { // The parameter of the opaque type. ty: Ty::Bound(BoundVar { debruijn: DebruijnIndex::ONE, index: 0 }), -- cgit v1.2.3