Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/missing_fields.rs')
-rw-r--r--crates/ide-diagnostics/src/handlers/missing_fields.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ide-diagnostics/src/handlers/missing_fields.rs b/crates/ide-diagnostics/src/handlers/missing_fields.rs
index fe71707f07..2030be4368 100644
--- a/crates/ide-diagnostics/src/handlers/missing_fields.rs
+++ b/crates/ide-diagnostics/src/handlers/missing_fields.rs
@@ -1,8 +1,6 @@
use either::Either;
use hir::{
- AssocItem, FindPathConfig, HasVisibility, HirDisplay, InFile, Type,
- db::{ExpandDatabase, HirDatabase},
- sym,
+ AssocItem, FindPathConfig, HasVisibility, HirDisplay, InFile, Type, db::HirDatabase, sym,
};
use ide_db::{
FxHashMap,
@@ -65,7 +63,7 @@ fn fixes(ctx: &DiagnosticsContext<'_, '_>, d: &hir::MissingFields) -> Option<Vec
return None;
}
- let root = ctx.sema.db.parse_or_expand(d.file);
+ let root = d.file.parse_or_expand(ctx.sema.db);
let current_module =
ctx.sema.scope(d.field_list_parent.to_node(&root).syntax()).map(|it| it.module());