Implement async blocks

This commit is contained in:
oxalica 2020-09-10 20:01:23 +08:00
parent 0275b08d15
commit 251ef93ac3
No known key found for this signature in database
GPG key ID: CED392DE0C483D00
11 changed files with 248 additions and 55 deletions

View file

@ -1283,6 +1283,8 @@ impl Type {
/// Checks that particular type `ty` implements `std::future::Future`.
/// This function is used in `.await` syntax completion.
pub fn impls_future(&self, db: &dyn HirDatabase) -> bool {
// No special case for the type of async block, since Chalk can figure it out.
let krate = self.krate;
let std_future_trait =