diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-08-12 17:22:58 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-08-12 17:22:58 +0100 |
commit | 0cf48e48d75d267bfa38ff1319e7f7c0468fb53f (patch) | |
tree | 1bb96b2f52d184533d7bfdab9f792ee008368e45 /crates/ra_ide_api/src | |
parent | d5e8fa606de0f42544f8379d498be5acd78259de (diff) | |
parent | 475a93097f60ff1aa4fd725f86d89a831fcc9288 (diff) |
Merge #1683
1683: Use Source in Diagnostic r=matklad a=eupn
Closes #1681.
Co-authored-by: Evgenii P <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<Diagnostic> | |||
48 | }) | 48 | }) |
49 | }) | 49 | }) |
50 | .on::<hir::diagnostics::UnresolvedModule, _>(|d| { | 50 | .on::<hir::diagnostics::UnresolvedModule, _>(|d| { |
51 | let source_root = db.file_source_root(d.file().original_file(db)); | 51 | let source_root = db.file_source_root(d.source().file_id.original_file(db)); |
52 | let create_file = FileSystemEdit::CreateFile { source_root, path: d.candidate.clone() }; | 52 | let create_file = FileSystemEdit::CreateFile { source_root, path: d.candidate.clone() }; |
53 | let fix = SourceChange::file_system_edit("create module", create_file); | 53 | let fix = SourceChange::file_system_edit("create module", create_file); |
54 | res.borrow_mut().push(Diagnostic { | 54 | res.borrow_mut().push(Diagnostic { |