aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r--crates/ra_ide_api/Cargo.toml7
-rw-r--r--crates/ra_ide_api/src/db.rs2
-rw-r--r--crates/ra_ide_api/src/diagnostics.rs21
3 files changed, 7 insertions, 23 deletions
diff --git a/crates/ra_ide_api/Cargo.toml b/crates/ra_ide_api/Cargo.toml
index 97c8bab18..c64226801 100644
--- a/crates/ra_ide_api/Cargo.toml
+++ b/crates/ra_ide_api/Cargo.toml
@@ -30,7 +30,12 @@ ra_assists = { path = "../ra_assists" }
30 30
31[dev-dependencies] 31[dev-dependencies]
32insta = "0.7.0" 32insta = "0.7.0"
33proptest = "0.9.0" 33
34[dev-dependencies.proptest]
35version = "0.9.0"
36# Disable `fork` feature to allow compiling on webassembly
37default-features = false
38features = ["std", "bit-set", "break-dead-code"]
34 39
35[features] 40[features]
36jemalloc = [ "jemallocator", "jemalloc-ctl" ] 41jemalloc = [ "jemallocator", "jemalloc-ctl" ]
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 }