diff options
author | Emil Lauridsen <[email protected]> | 2020-03-12 14:24:20 +0000 |
---|---|---|
committer | Emil Lauridsen <[email protected]> | 2020-03-12 14:24:20 +0000 |
commit | 98e8ad5e608b739d1d28a43c8c69358e77c1c1f0 (patch) | |
tree | 5a94c369d38da4a9e5d5598f57e0b8f8d9d5ded9 /crates/ra_cargo_watch/src/conv/test.rs | |
parent | 637c795b3c9a56795977ade0cedbc7a9fb7dc453 (diff) |
Handle diagnostics with multiple primary spans
Diffstat (limited to 'crates/ra_cargo_watch/src/conv/test.rs')
-rw-r--r-- | crates/ra_cargo_watch/src/conv/test.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_cargo_watch/src/conv/test.rs b/crates/ra_cargo_watch/src/conv/test.rs index c880dcdc3..4e81455ca 100644 --- a/crates/ra_cargo_watch/src/conv/test.rs +++ b/crates/ra_cargo_watch/src/conv/test.rs | |||
@@ -58,7 +58,7 @@ fn snap_rustc_incompatible_type_for_trait() { | |||
58 | ); | 58 | ); |
59 | 59 | ||
60 | let workspace_root = PathBuf::from("/test/"); | 60 | let workspace_root = PathBuf::from("/test/"); |
61 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root).expect("couldn't map diagnostic"); | 61 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root); |
62 | insta::assert_debug_snapshot!(diag); | 62 | insta::assert_debug_snapshot!(diag); |
63 | } | 63 | } |
64 | 64 | ||
@@ -141,7 +141,7 @@ fn snap_rustc_unused_variable() { | |||
141 | ); | 141 | ); |
142 | 142 | ||
143 | let workspace_root = PathBuf::from("/test/"); | 143 | let workspace_root = PathBuf::from("/test/"); |
144 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root).expect("couldn't map diagnostic"); | 144 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root); |
145 | insta::assert_debug_snapshot!(diag); | 145 | insta::assert_debug_snapshot!(diag); |
146 | } | 146 | } |
147 | 147 | ||
@@ -266,7 +266,7 @@ fn snap_rustc_wrong_number_of_parameters() { | |||
266 | ); | 266 | ); |
267 | 267 | ||
268 | let workspace_root = PathBuf::from("/test/"); | 268 | let workspace_root = PathBuf::from("/test/"); |
269 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root).expect("couldn't map diagnostic"); | 269 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root); |
270 | insta::assert_debug_snapshot!(diag); | 270 | insta::assert_debug_snapshot!(diag); |
271 | } | 271 | } |
272 | 272 | ||
@@ -387,7 +387,7 @@ fn snap_clippy_pass_by_ref() { | |||
387 | ); | 387 | ); |
388 | 388 | ||
389 | let workspace_root = PathBuf::from("/test/"); | 389 | let workspace_root = PathBuf::from("/test/"); |
390 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root).expect("couldn't map diagnostic"); | 390 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root); |
391 | insta::assert_debug_snapshot!(diag); | 391 | insta::assert_debug_snapshot!(diag); |
392 | } | 392 | } |
393 | 393 | ||
@@ -431,7 +431,7 @@ fn snap_rustc_mismatched_type() { | |||
431 | ); | 431 | ); |
432 | 432 | ||
433 | let workspace_root = PathBuf::from("/test/"); | 433 | let workspace_root = PathBuf::from("/test/"); |
434 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root).expect("couldn't map diagnostic"); | 434 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root); |
435 | insta::assert_debug_snapshot!(diag); | 435 | insta::assert_debug_snapshot!(diag); |
436 | } | 436 | } |
437 | 437 | ||
@@ -703,7 +703,7 @@ fn snap_handles_macro_location() { | |||
703 | ); | 703 | ); |
704 | 704 | ||
705 | let workspace_root = PathBuf::from("/test/"); | 705 | let workspace_root = PathBuf::from("/test/"); |
706 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root).expect("couldn't map diagnostic"); | 706 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root); |
707 | insta::assert_debug_snapshot!(diag); | 707 | insta::assert_debug_snapshot!(diag); |
708 | } | 708 | } |
709 | 709 | ||
@@ -933,7 +933,7 @@ fn snap_macro_compiler_error() { | |||
933 | ); | 933 | ); |
934 | 934 | ||
935 | let workspace_root = PathBuf::from("/test/"); | 935 | let workspace_root = PathBuf::from("/test/"); |
936 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root).expect("couldn't map diagnostic"); | 936 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root); |
937 | insta::assert_debug_snapshot!(diag); | 937 | insta::assert_debug_snapshot!(diag); |
938 | } | 938 | } |
939 | 939 | ||
@@ -1067,6 +1067,6 @@ fn snap_multi_line_fix() { | |||
1067 | ); | 1067 | ); |
1068 | 1068 | ||
1069 | let workspace_root = PathBuf::from("/test/"); | 1069 | let workspace_root = PathBuf::from("/test/"); |
1070 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root).expect("couldn't map diagnostic"); | 1070 | let diag = map_rust_diagnostic_to_lsp(&diag, &workspace_root); |
1071 | insta::assert_debug_snapshot!(diag); | 1071 | insta::assert_debug_snapshot!(diag); |
1072 | } | 1072 | } |