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/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap | |
parent | 637c795b3c9a56795977ade0cedbc7a9fb7dc453 (diff) |
Handle diagnostics with multiple primary spans
Diffstat (limited to 'crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap')
-rw-r--r-- | crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap | 194 |
1 files changed, 98 insertions, 96 deletions
diff --git a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap index 23c4f5a2c..0557a2e79 100644 --- a/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap +++ b/crates/ra_cargo_watch/src/conv/snapshots/ra_cargo_watch__conv__test__snap_multi_line_fix.snap | |||
@@ -2,111 +2,113 @@ | |||
2 | source: crates/ra_cargo_watch/src/conv/test.rs | 2 | source: crates/ra_cargo_watch/src/conv/test.rs |
3 | expression: diag | 3 | expression: diag |
4 | --- | 4 | --- |
5 | MappedRustDiagnostic { | 5 | [ |
6 | location: Location { | 6 | MappedRustDiagnostic { |
7 | uri: "file:///test/src/main.rs", | 7 | location: Location { |
8 | range: Range { | 8 | uri: "file:///test/src/main.rs", |
9 | start: Position { | 9 | range: Range { |
10 | line: 3, | 10 | start: Position { |
11 | character: 4, | 11 | line: 3, |
12 | }, | 12 | character: 4, |
13 | end: Position { | 13 | }, |
14 | line: 3, | 14 | end: Position { |
15 | character: 5, | 15 | line: 3, |
16 | character: 5, | ||
17 | }, | ||
16 | }, | 18 | }, |
17 | }, | 19 | }, |
18 | }, | 20 | diagnostic: Diagnostic { |
19 | diagnostic: Diagnostic { | 21 | range: Range { |
20 | range: Range { | 22 | start: Position { |
21 | start: Position { | 23 | line: 3, |
22 | line: 3, | 24 | character: 4, |
23 | character: 4, | 25 | }, |
24 | }, | 26 | end: Position { |
25 | end: Position { | 27 | line: 3, |
26 | line: 3, | 28 | character: 5, |
27 | character: 5, | 29 | }, |
28 | }, | 30 | }, |
29 | }, | 31 | severity: Some( |
30 | severity: Some( | 32 | Warning, |
31 | Warning, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "let_and_return", | ||
36 | ), | 33 | ), |
37 | ), | 34 | code: Some( |
38 | source: Some( | 35 | String( |
39 | "clippy", | 36 | "let_and_return", |
40 | ), | 37 | ), |
41 | message: "returning the result of a let binding from a block\n`#[warn(clippy::let_and_return)]` on by default\nfor further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return", | 38 | ), |
42 | related_information: Some( | 39 | source: Some( |
43 | [ | 40 | "clippy", |
44 | DiagnosticRelatedInformation { | 41 | ), |
45 | location: Location { | 42 | message: "returning the result of a let binding from a block\n`#[warn(clippy::let_and_return)]` on by default\nfor further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return", |
46 | uri: "file:///test/src/main.rs", | 43 | related_information: Some( |
47 | range: Range { | 44 | [ |
48 | start: Position { | 45 | DiagnosticRelatedInformation { |
49 | line: 2, | 46 | location: Location { |
50 | character: 4, | 47 | uri: "file:///test/src/main.rs", |
51 | }, | 48 | range: Range { |
52 | end: Position { | 49 | start: Position { |
53 | line: 2, | 50 | line: 2, |
54 | character: 30, | 51 | character: 4, |
52 | }, | ||
53 | end: Position { | ||
54 | line: 2, | ||
55 | character: 30, | ||
56 | }, | ||
55 | }, | 57 | }, |
56 | }, | 58 | }, |
59 | message: "unnecessary let binding", | ||
57 | }, | 60 | }, |
58 | message: "unnecessary let binding", | 61 | ], |
59 | }, | ||
60 | ], | ||
61 | ), | ||
62 | tags: None, | ||
63 | }, | ||
64 | fixes: [ | ||
65 | CodeAction { | ||
66 | title: "return the expression directly", | ||
67 | kind: Some( | ||
68 | "quickfix", | ||
69 | ), | 62 | ), |
70 | diagnostics: None, | 63 | tags: None, |
71 | edit: Some( | 64 | }, |
72 | WorkspaceEdit { | 65 | fixes: [ |
73 | changes: Some( | 66 | CodeAction { |
74 | { | 67 | title: "return the expression directly", |
75 | "file:///test/src/main.rs": [ | 68 | kind: Some( |
76 | TextEdit { | 69 | "quickfix", |
77 | range: Range { | 70 | ), |
78 | start: Position { | 71 | diagnostics: None, |
79 | line: 2, | 72 | edit: Some( |
80 | character: 4, | 73 | WorkspaceEdit { |
81 | }, | 74 | changes: Some( |
82 | end: Position { | 75 | { |
83 | line: 2, | 76 | "file:///test/src/main.rs": [ |
84 | character: 30, | 77 | TextEdit { |
78 | range: Range { | ||
79 | start: Position { | ||
80 | line: 2, | ||
81 | character: 4, | ||
82 | }, | ||
83 | end: Position { | ||
84 | line: 2, | ||
85 | character: 30, | ||
86 | }, | ||
85 | }, | 87 | }, |
88 | new_text: "", | ||
86 | }, | 89 | }, |
87 | new_text: "", | 90 | TextEdit { |
88 | }, | 91 | range: Range { |
89 | TextEdit { | 92 | start: Position { |
90 | range: Range { | 93 | line: 3, |
91 | start: Position { | 94 | character: 4, |
92 | line: 3, | 95 | }, |
93 | character: 4, | 96 | end: Position { |
94 | }, | 97 | line: 3, |
95 | end: Position { | 98 | character: 5, |
96 | line: 3, | 99 | }, |
97 | character: 5, | ||
98 | }, | 100 | }, |
101 | new_text: "(0..10).collect()", | ||
99 | }, | 102 | }, |
100 | new_text: "(0..10).collect()", | 103 | ], |
101 | }, | 104 | }, |
102 | ], | 105 | ), |
103 | }, | 106 | document_changes: None, |
104 | ), | 107 | }, |
105 | document_changes: None, | 108 | ), |
106 | }, | 109 | command: None, |
107 | ), | 110 | is_preferred: None, |
108 | command: None, | 111 | }, |
109 | is_preferred: None, | 112 | ], |
110 | }, | 113 | }, |
111 | ], | 114 | ] |
112 | } | ||