aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-23 13:32:42 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-23 13:32:42 +0000
commit5a6a3d077734d12fe5c7de2af64572611b23b79b (patch)
tree50dce360d95d114e0656847cd433e4254d41c9eb /crates
parentbce55c749a65f268a156606fa7e8dc15821ee631 (diff)
parent46a21b07e6f6f6f795a66d42144f8031ddba46dc (diff)
Merge #1027
1027: remove obsolete diagnostic r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir/src/code_model_api.rs1
-rw-r--r--crates/ra_ide_api/src/diagnostics.rs21
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)]
99pub enum Problem { 99pub enum Problem {
100 UnresolvedModule { candidate: RelativePathBuf }, 100 UnresolvedModule { candidate: RelativePathBuf },
101 NotDirOwner { move_to: RelativePathBuf, candidate: RelativePathBuf },
102} 101}
103 102
104impl Module { 103impl 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 }