aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/db.rs2
-rw-r--r--crates/ra_ide_api/src/diagnostics.rs21
2 files changed, 1 insertions, 22 deletions
diff --git a/crates/ra_ide_api/src/db.rs b/crates/ra_ide_api/src/db.rs
index 00f4bdfd2..ea4255d35 100644
--- a/crates/ra_ide_api/src/db.rs
+++ b/crates/ra_ide_api/src/db.rs
@@ -15,7 +15,7 @@ use crate::{LineIndex, symbol_index::{self, SymbolsDatabase}};
15 LineIndexDatabaseStorage, 15 LineIndexDatabaseStorage,
16 symbol_index::SymbolsDatabaseStorage, 16 symbol_index::SymbolsDatabaseStorage,
17 hir::db::HirDatabaseStorage, 17 hir::db::HirDatabaseStorage,
18 hir::db::PersistentHirDatabaseStorage 18 hir::db::DefDatabaseStorage
19)] 19)]
20#[derive(Debug)] 20#[derive(Debug)]
21pub(crate) struct RootDatabase { 21pub(crate) struct RootDatabase {
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs
index aabb614b9..b9dc424c6 100644
--- a/crates/ra_ide_api/src/diagnostics.rs
+++ b/crates/ra_ide_api/src/diagnostics.rs
@@ -157,27 +157,6 @@ fn check_module(
157 fix: Some(fix), 157 fix: Some(fix),
158 } 158 }
159 } 159 }
160 Problem::NotDirOwner { move_to, candidate } => {
161 let move_file = FileSystemEdit::MoveFile {
162 src: file_id,
163 dst_source_root: source_root,
164 dst_path: move_to.clone(),
165 };
166 let create_file =
167 FileSystemEdit::CreateFile { source_root, path: move_to.join(candidate) };
168 let fix = SourceChange {
169 label: "move file and create module".to_string(),
170 source_file_edits: Vec::new(),
171 file_system_edits: vec![move_file, create_file],
172 cursor_position: None,
173 };
174 Diagnostic {
175 range: name_node.range(),
176 message: "can't declare module at this location".to_string(),
177 severity: Severity::Error,
178 fix: Some(fix),
179 }
180 }
181 }; 160 };
182 acc.push(diag) 161 acc.push(diag)
183 } 162 }