diff options
Diffstat (limited to 'crates/ra_ide_api/src/diagnostics.rs')
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 21 |
1 files changed, 0 insertions, 21 deletions
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 | } |