aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/diagnostics.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-23 23:46:23 +0100
committerAleksey Kladov <[email protected]>2019-05-23 23:46:23 +0100
commit53ae63835da570c3419712141b34180ff9aae95c (patch)
treef9e9adcfce755581001f9ab0c1c22f2f049d045d /crates/ra_ide_api/src/diagnostics.rs
parentde87fe293e88e2b8785e1d90371ec4f274139454 (diff)
:arrow_up: rustc
Diffstat (limited to 'crates/ra_ide_api/src/diagnostics.rs')
-rw-r--r--crates/ra_ide_api/src/diagnostics.rs46
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]