Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-ssr/src/resolving.rs')
-rw-r--r--crates/ide-ssr/src/resolving.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ide-ssr/src/resolving.rs b/crates/ide-ssr/src/resolving.rs
index 461de4092e..3dbba0ff2d 100644
--- a/crates/ide-ssr/src/resolving.rs
+++ b/crates/ide-ssr/src/resolving.rs
@@ -25,13 +25,13 @@ pub(crate) struct ResolvedPattern<'db> {
pub(crate) placeholders_by_stand_in: FxHashMap<SmolStr, parsing::Placeholder>,
pub(crate) node: SyntaxNode,
// Paths in `node` that we've resolved.
- pub(crate) resolved_paths: FxHashMap<SyntaxNode, ResolvedPath>,
+ pub(crate) resolved_paths: FxHashMap<SyntaxNode, ResolvedPath<'db>>,
pub(crate) ufcs_function_calls: FxHashMap<SyntaxNode, UfcsCallInfo<'db>>,
pub(crate) contains_self: bool,
}
-pub(crate) struct ResolvedPath {
- pub(crate) resolution: hir::PathResolution,
+pub(crate) struct ResolvedPath<'db> {
+ pub(crate) resolution: hir::PathResolution<'db>,
/// The depth of the ast::Path that was resolved within the pattern.
pub(crate) depth: u32,
}
@@ -120,7 +120,7 @@ impl<'db> Resolver<'_, 'db> {
&self,
node: SyntaxNode,
depth: u32,
- resolved_paths: &mut FxHashMap<SyntaxNode, ResolvedPath>,
+ resolved_paths: &mut FxHashMap<SyntaxNode, ResolvedPath<'db>>,
) -> Result<(), SsrError> {
use syntax::ast::AstNode;
if let Some(path) = ast::Path::cast(node.clone()) {
@@ -165,7 +165,7 @@ impl<'db> Resolver<'_, 'db> {
false
}
- fn ok_to_use_path_resolution(&self, resolution: &hir::PathResolution) -> bool {
+ fn ok_to_use_path_resolution(&self, resolution: &hir::PathResolution<'db>) -> bool {
match resolution {
hir::PathResolution::Def(hir::ModuleDef::Function(function))
if function.as_assoc_item(self.resolution_scope.scope.db).is_some() =>
@@ -215,7 +215,7 @@ impl<'db> ResolutionScope<'db> {
self.node.ancestors().find(|node| node.kind() == SyntaxKind::FN)
}
- fn resolve_path(&self, path: &ast::Path) -> Option<hir::PathResolution> {
+ fn resolve_path(&self, path: &ast::Path) -> Option<hir::PathResolution<'db>> {
// First try resolving the whole path. This will work for things like
// `std::collections::HashMap`, but will fail for things like
// `std::collections::HashMap::new`.