diff options
author | Emil Lauridsen <[email protected]> | 2019-12-25 16:31:49 +0000 |
---|---|---|
committer | Emil Lauridsen <[email protected]> | 2019-12-25 16:37:40 +0000 |
commit | c21fbc3e87d1e701f29fafcdad0a73e8d69a2f29 (patch) | |
tree | 0d013438df4c61f510dada3787aaa5dc8a30138e /crates/ra_lsp_server/src/snapshots/test__snap_rustc_unused_variable.snap | |
parent | 17360b5d14ec98085169bfb344b220dcfc75b9f0 (diff) |
Migrate tests from extension to rust
Diffstat (limited to 'crates/ra_lsp_server/src/snapshots/test__snap_rustc_unused_variable.snap')
-rw-r--r-- | crates/ra_lsp_server/src/snapshots/test__snap_rustc_unused_variable.snap | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/snapshots/test__snap_rustc_unused_variable.snap b/crates/ra_lsp_server/src/snapshots/test__snap_rustc_unused_variable.snap new file mode 100644 index 000000000..33a3e3034 --- /dev/null +++ b/crates/ra_lsp_server/src/snapshots/test__snap_rustc_unused_variable.snap | |||
@@ -0,0 +1,70 @@ | |||
1 | --- | ||
2 | source: crates/ra_lsp_server/src/cargo_check.rs | ||
3 | expression: diag | ||
4 | --- | ||
5 | MappedRustDiagnostic { | ||
6 | location: Location { | ||
7 | uri: "file:///test/driver/subcommand/repl.rs", | ||
8 | range: Range { | ||
9 | start: Position { | ||
10 | line: 290, | ||
11 | character: 8, | ||
12 | }, | ||
13 | end: Position { | ||
14 | line: 290, | ||
15 | character: 11, | ||
16 | }, | ||
17 | }, | ||
18 | }, | ||
19 | diagnostic: Diagnostic { | ||
20 | range: Range { | ||
21 | start: Position { | ||
22 | line: 290, | ||
23 | character: 8, | ||
24 | }, | ||
25 | end: Position { | ||
26 | line: 290, | ||
27 | character: 11, | ||
28 | }, | ||
29 | }, | ||
30 | severity: Some( | ||
31 | Warning, | ||
32 | ), | ||
33 | code: Some( | ||
34 | String( | ||
35 | "unused_variables", | ||
36 | ), | ||
37 | ), | ||
38 | source: Some( | ||
39 | "rustc", | ||
40 | ), | ||
41 | message: "unused variable: `foo`\n#[warn(unused_variables)] on by default", | ||
42 | related_information: None, | ||
43 | tags: Some( | ||
44 | [ | ||
45 | Unnecessary, | ||
46 | ], | ||
47 | ), | ||
48 | }, | ||
49 | suggested_fixes: [ | ||
50 | SuggestedFix { | ||
51 | title: "consider prefixing with an underscore: \'_foo\'", | ||
52 | location: Location { | ||
53 | uri: "file:///test/driver/subcommand/repl.rs", | ||
54 | range: Range { | ||
55 | start: Position { | ||
56 | line: 290, | ||
57 | character: 8, | ||
58 | }, | ||
59 | end: Position { | ||
60 | line: 290, | ||
61 | character: 11, | ||
62 | }, | ||
63 | }, | ||
64 | }, | ||
65 | replacement: "_foo", | ||
66 | applicability: MachineApplicable, | ||
67 | diagnostics: [], | ||
68 | }, | ||
69 | ], | ||
70 | } | ||