diff options
Diffstat (limited to 'crates/ra_ide_api/src/diagnostics.rs')
-rw-r--r-- | crates/ra_ide_api/src/diagnostics.rs | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 9a0eb2c14..923008708 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs | |||
@@ -310,28 +310,30 @@ mod tests { | |||
310 | fn test_unresolved_module_diagnostic() { | 310 | fn test_unresolved_module_diagnostic() { |
311 | let (analysis, file_id) = single_file("mod foo;"); | 311 | let (analysis, file_id) = single_file("mod foo;"); |
312 | let diagnostics = analysis.diagnostics(file_id).unwrap(); | 312 | let diagnostics = analysis.diagnostics(file_id).unwrap(); |
313 | assert_debug_snapshot_matches!(diagnostics, @r####"[ | 313 | assert_debug_snapshot_matches!(diagnostics, @r###" |
314 | Diagnostic { | 314 | ⋮[ |
315 | message: "unresolved module", | 315 | ⋮ Diagnostic { |
316 | range: [0; 8), | 316 | ⋮ message: "unresolved module", |
317 | fix: Some( | 317 | ⋮ range: [0; 8), |
318 | SourceChange { | 318 | ⋮ fix: Some( |
319 | label: "create module", | 319 | ⋮ SourceChange { |
320 | source_file_edits: [], | 320 | ⋮ label: "create module", |
321 | file_system_edits: [ | 321 | ⋮ source_file_edits: [], |
322 | CreateFile { | 322 | ⋮ file_system_edits: [ |
323 | source_root: SourceRootId( | 323 | ⋮ CreateFile { |
324 | 0 | 324 | ⋮ source_root: SourceRootId( |
325 | ), | 325 | ⋮ 0, |
326 | path: "foo.rs" | 326 | ⋮ ), |
327 | } | 327 | ⋮ path: "foo.rs", |
328 | ], | 328 | ⋮ }, |
329 | cursor_position: None | 329 | ⋮ ], |
330 | } | 330 | ⋮ cursor_position: None, |
331 | ), | 331 | ⋮ }, |
332 | severity: Error | 332 | ⋮ ), |
333 | } | 333 | ⋮ severity: Error, |
334 | ]"####); | 334 | ⋮ }, |
335 | ⋮] | ||
336 | "###); | ||
335 | } | 337 | } |
336 | 338 | ||
337 | #[test] | 339 | #[test] |