diff options
Diffstat (limited to 'crates/rust-analyzer/test_data/rustc_unused_variable_as_hint.txt')
-rw-r--r-- | crates/rust-analyzer/test_data/rustc_unused_variable_as_hint.txt | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/crates/rust-analyzer/test_data/rustc_unused_variable_as_hint.txt b/crates/rust-analyzer/test_data/rustc_unused_variable_as_hint.txt new file mode 100644 index 000000000..d5d78fd80 --- /dev/null +++ b/crates/rust-analyzer/test_data/rustc_unused_variable_as_hint.txt | |||
@@ -0,0 +1,70 @@ | |||
1 | [ | ||
2 | MappedRustDiagnostic { | ||
3 | url: "file:///test/driver/subcommand/repl.rs", | ||
4 | diagnostic: Diagnostic { | ||
5 | range: Range { | ||
6 | start: Position { | ||
7 | line: 290, | ||
8 | character: 8, | ||
9 | }, | ||
10 | end: Position { | ||
11 | line: 290, | ||
12 | character: 11, | ||
13 | }, | ||
14 | }, | ||
15 | severity: Some( | ||
16 | Hint, | ||
17 | ), | ||
18 | code: Some( | ||
19 | String( | ||
20 | "unused_variables", | ||
21 | ), | ||
22 | ), | ||
23 | source: Some( | ||
24 | "rustc", | ||
25 | ), | ||
26 | message: "unused variable: `foo`\n#[warn(unused_variables)] on by default", | ||
27 | related_information: None, | ||
28 | tags: Some( | ||
29 | [ | ||
30 | Unnecessary, | ||
31 | ], | ||
32 | ), | ||
33 | }, | ||
34 | fixes: [ | ||
35 | CodeAction { | ||
36 | title: "consider prefixing with an underscore", | ||
37 | id: None, | ||
38 | group: None, | ||
39 | kind: Some( | ||
40 | "quickfix", | ||
41 | ), | ||
42 | command: None, | ||
43 | edit: Some( | ||
44 | SnippetWorkspaceEdit { | ||
45 | changes: Some( | ||
46 | { | ||
47 | "file:///test/driver/subcommand/repl.rs": [ | ||
48 | TextEdit { | ||
49 | range: Range { | ||
50 | start: Position { | ||
51 | line: 290, | ||
52 | character: 8, | ||
53 | }, | ||
54 | end: Position { | ||
55 | line: 290, | ||
56 | character: 11, | ||
57 | }, | ||
58 | }, | ||
59 | new_text: "_foo", | ||
60 | }, | ||
61 | ], | ||
62 | }, | ||
63 | ), | ||
64 | document_changes: None, | ||
65 | }, | ||
66 | ), | ||
67 | }, | ||
68 | ], | ||
69 | }, | ||
70 | ] | ||