Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/diagnostics.rs')
-rw-r--r--crates/hir/src/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs
index d99ed37d7e..33a46a3e17 100644
--- a/crates/hir/src/diagnostics.rs
+++ b/crates/hir/src/diagnostics.rs
@@ -993,7 +993,7 @@ impl<'db> AnyDiagnostic<'db> {
}
InferenceDiagnostic::PathDiagnostic { node, diag } => {
let source = expr_or_pat_syntax(*node)?;
- let syntax = source.value.to_node(&db.parse_or_expand(source.file_id));
+ let syntax = source.value.to_node(&source.file_id.parse_or_expand(db));
let path = match_ast! {
match (syntax.syntax()) {
ast::RecordExpr(it) => it.path()?,
@@ -1296,7 +1296,7 @@ impl<'db> AnyDiagnostic<'db> {
Some(match diag {
TyLoweringDiagnostic::PathDiagnostic { source, diag } => {
let source = Self::type_syntax(*source, source_map)?;
- let syntax = source.value.to_node(&db.parse_or_expand(source.file_id));
+ let syntax = source.value.to_node(&source.file_id.parse_or_expand(db));
let ast::Type::PathType(syntax) = syntax else { return None };
Self::path_diagnostic(diag, source.with_value(syntax.path()?))?
}