diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-23 23:50:34 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-23 23:50:34 +0100 |
commit | 8a9cc674212f2301c9b3283359f995366409bd0d (patch) | |
tree | 068d6bddab6b25398d03bcf8f74bcb5f2b9a592a /crates/ra_ide_api/src/diagnostics.rs | |
parent | de87fe293e88e2b8785e1d90371ec4f274139454 (diff) | |
parent | 0270b4bc577ba57f211d25bab161a607b9b94ec5 (diff) |
Merge #1321
1321: Rustc r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
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] |