From 475a93097f60ff1aa4fd725f86d89a831fcc9288 Mon Sep 17 00:00:00 2001 From: Evgenii P Date: Mon, 12 Aug 2019 23:06:08 +0700 Subject: Use Source in Diagnostic and implement --- crates/ra_ide_api/src/diagnostics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide_api/src/diagnostics.rs') diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 028dc3d4f..98b840b26 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs @@ -48,7 +48,7 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec }) }) .on::(|d| { - let source_root = db.file_source_root(d.file().original_file(db)); + let source_root = db.file_source_root(d.source().file_id.original_file(db)); let create_file = FileSystemEdit::CreateFile { source_root, path: d.candidate.clone() }; let fix = SourceChange::file_system_edit("create module", create_file); res.borrow_mut().push(Diagnostic { -- cgit v1.2.3