mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Use path macro
This commit is contained in:
parent
6911bc89a7
commit
f02fcc1644
4 changed files with 49 additions and 80 deletions
|
@ -15,7 +15,7 @@ use hir_def::{
|
|||
},
|
||||
expr::{ExprId, PatId},
|
||||
nameres::ModuleSource,
|
||||
path::known,
|
||||
path::path,
|
||||
resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs},
|
||||
AssocItemId, DefWithBodyId,
|
||||
};
|
||||
|
@ -418,7 +418,7 @@ impl SourceAnalyzer {
|
|||
/// Checks that particular type `ty` implements `std::future::Future`.
|
||||
/// This function is used in `.await` syntax completion.
|
||||
pub fn impls_future(&self, db: &impl HirDatabase, ty: Type) -> bool {
|
||||
let std_future_path = known::std_future_future();
|
||||
let std_future_path = path![std::future::Future];
|
||||
|
||||
let std_future_trait = match self.resolver.resolve_known_trait(db, &std_future_path) {
|
||||
Some(it) => it.into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue