aboutsummaryrefslogtreecommitdiff
path: root/crates/ssr
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ssr')
-rw-r--r--crates/ssr/src/resolving.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ssr/src/resolving.rs b/crates/ssr/src/resolving.rs
index 4441fb426..b932132d5 100644
--- a/crates/ssr/src/resolving.rs
+++ b/crates/ssr/src/resolving.rs
@@ -212,13 +212,13 @@ impl<'db> ResolutionScope<'db> {
212 // First try resolving the whole path. This will work for things like 212 // First try resolving the whole path. This will work for things like
213 // `std::collections::HashMap`, but will fail for things like 213 // `std::collections::HashMap`, but will fail for things like
214 // `std::collections::HashMap::new`. 214 // `std::collections::HashMap::new`.
215 if let Some(resolution) = self.scope.resolve_hypothetical(&path) { 215 if let Some(resolution) = self.scope.speculative_resolve(&path) {
216 return Some(resolution); 216 return Some(resolution);
217 } 217 }
218 // Resolution failed, try resolving the qualifier (e.g. `std::collections::HashMap` and if 218 // Resolution failed, try resolving the qualifier (e.g. `std::collections::HashMap` and if
219 // that succeeds, then iterate through the candidates on the resolved type with the provided 219 // that succeeds, then iterate through the candidates on the resolved type with the provided
220 // name. 220 // name.
221 let resolved_qualifier = self.scope.resolve_hypothetical(&path.qualifier()?)?; 221 let resolved_qualifier = self.scope.speculative_resolve(&path.qualifier()?)?;
222 if let hir::PathResolution::Def(hir::ModuleDef::Adt(adt)) = resolved_qualifier { 222 if let hir::PathResolution::Def(hir::ModuleDef::Adt(adt)) = resolved_qualifier {
223 let name = path.segment()?.name_ref()?; 223 let name = path.segment()?.name_ref()?;
224 adt.ty(self.scope.db).iterate_path_candidates( 224 adt.ty(self.scope.db).iterate_path_candidates(