mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Find IntoFuture::IntoFuture's poll method
This commit is contained in:
parent
dc3219bb11
commit
cebf95718c
4 changed files with 65 additions and 10 deletions
|
@ -2777,9 +2777,10 @@ impl Type {
|
|||
self.ty.is_unknown()
|
||||
}
|
||||
|
||||
/// Checks that particular type `ty` implements `std::future::Future`.
|
||||
/// Checks that particular type `ty` implements `std::future::IntoFuture` or
|
||||
/// `std::future::Future`.
|
||||
/// This function is used in `.await` syntax completion.
|
||||
pub fn impls_future(&self, db: &dyn HirDatabase) -> bool {
|
||||
pub fn impls_into_future(&self, db: &dyn HirDatabase) -> bool {
|
||||
let trait_ = db
|
||||
.lang_item(self.env.krate, SmolStr::new_inline("into_future"))
|
||||
.and_then(|it| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue