diff options
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 1 | ||||
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 21 |
2 files changed, 0 insertions, 22 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 3f2e14bc8..45fa4cd11 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -98,7 +98,6 @@ pub enum ModuleSource { | |||
98 | #[derive(Clone, Debug, Hash, PartialEq, Eq)] | 98 | #[derive(Clone, Debug, Hash, PartialEq, Eq)] |
99 | pub enum Problem { | 99 | pub enum Problem { |
100 | UnresolvedModule { candidate: RelativePathBuf }, | 100 | UnresolvedModule { candidate: RelativePathBuf }, |
101 | NotDirOwner { move_to: RelativePathBuf, candidate: RelativePathBuf }, | ||
102 | } | 101 | } |
103 | 102 | ||
104 | impl Module { | 103 | impl Module { |
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 069092528..e1c5a1b39 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -152,27 +152,6 @@ fn check_module( | |||
152 | fix: Some(fix), | 152 | fix: Some(fix), |
153 | } | 153 | } |
154 | } | 154 | } |
155 | Problem::NotDirOwner { move_to, candidate } => { | ||
156 | let move_file = FileSystemEdit::MoveFile { | ||
157 | src: file_id, | ||
158 | dst_source_root: source_root, | ||
159 | dst_path: move_to.clone(), | ||
160 | }; | ||
161 | let create_file = | ||
162 | FileSystemEdit::CreateFile { source_root, path: move_to.join(candidate) }; | ||
163 | let fix = SourceChange { | ||
164 | label: "move file and create module".to_string(), | ||
165 | source_file_edits: Vec::new(), | ||
166 | file_system_edits: vec![move_file, create_file], | ||
167 | cursor_position: None, | ||
168 | }; | ||
169 | Diagnostic { | ||
170 | range: name_node.range(), | ||
171 | message: "can't declare module at this location".to_string(), | ||
172 | severity: Severity::Error, | ||
173 | fix: Some(fix), | ||
174 | } | ||
175 | } | ||
176 | }; | 155 | }; |
177 | acc.push(diag) | 156 | acc.push(diag) |
178 | } | 157 | } |