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 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 | } |