]> git.lizzy.rs Git - rust.git/blob - crates/rust-analyzer/src/diagnostics/test_data/rustc_unused_variable_as_info.txt
Merge #6313
[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             code_description: None,
24             source: Some(
25                 "rustc",
26             ),
27             message: "unused variable: `foo`\n#[warn(unused_variables)] on by default",
28             related_information: None,
29             tags: Some(
30                 [
31                     Unnecessary,
32                 ],
33             ),
34             data: None,
35         },
36         fixes: [
37             CodeAction {
38                 title: "consider prefixing with an underscore",
39                 id: None,
40                 group: None,
41                 kind: Some(
42                     CodeActionKind(
43                         "quickfix",
44                     ),
45                 ),
46                 edit: Some(
47                     SnippetWorkspaceEdit {
48                         changes: Some(
49                             {
50                                 "file:///test/driver/subcommand/repl.rs": [
51                                     TextEdit {
52                                         range: Range {
53                                             start: Position {
54                                                 line: 290,
55                                                 character: 8,
56                                             },
57                                             end: Position {
58                                                 line: 290,
59                                                 character: 11,
60                                             },
61                                         },
62                                         new_text: "_foo",
63                                     },
64                                 ],
65                             },
66                         ),
67                         document_changes: None,
68                     },
69                 ),
70                 is_preferred: Some(
71                     true,
72                 ),
73             },
74         ],
75     },
76 ]