]> git.lizzy.rs Git - rust.git/blob - crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
:arrow_up: expect-test
[rust.git] / crates / rust-analyzer / src / diagnostics / test_data / rustc_unused_variable_as_info.txt
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                 Information,
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                     CodeActionKind(
41                         "quickfix",
42                     ),
43                 ),
44                 edit: Some(
45                     SnippetWorkspaceEdit {
46                         changes: Some(
47                             {
48                                 "file:///test/driver/subcommand/repl.rs": [
49                                     TextEdit {
50                                         range: Range {
51                                             start: Position {
52                                                 line: 290,
53                                                 character: 8,
54                                             },
55                                             end: Position {
56                                                 line: 290,
57                                                 character: 11,
58                                             },
59                                         },
60                                         new_text: "_foo",
61                                     },
62                                 ],
63                             },
64                         ),
65                         document_changes: None,
66                     },
67                 ),
68                 is_preferred: Some(
69                     true,
70                 ),
71             },
72         ],
73     },
74 ]