• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[
2    MappedRustDiagnostic {
3        url: Url {
4            scheme: "file",
5            cannot_be_a_base: false,
6            username: "",
7            password: None,
8            host: None,
9            port: None,
10            path: "/test/driver/subcommand/repl.rs",
11            query: None,
12            fragment: None,
13        },
14        diagnostic: Diagnostic {
15            range: Range {
16                start: Position {
17                    line: 290,
18                    character: 8,
19                },
20                end: Position {
21                    line: 290,
22                    character: 11,
23                },
24            },
25            severity: Some(
26                Hint,
27            ),
28            code: Some(
29                String(
30                    "unused_variables",
31                ),
32            ),
33            code_description: None,
34            source: Some(
35                "rustc",
36            ),
37            message: "unused variable: `foo`\n#[warn(unused_variables)] on by default",
38            related_information: Some(
39                [
40                    DiagnosticRelatedInformation {
41                        location: Location {
42                            uri: Url {
43                                scheme: "file",
44                                cannot_be_a_base: false,
45                                username: "",
46                                password: None,
47                                host: None,
48                                port: None,
49                                path: "/test/driver/subcommand/repl.rs",
50                                query: None,
51                                fragment: None,
52                            },
53                            range: Range {
54                                start: Position {
55                                    line: 290,
56                                    character: 8,
57                                },
58                                end: Position {
59                                    line: 290,
60                                    character: 11,
61                                },
62                            },
63                        },
64                        message: "consider prefixing with an underscore: `_foo`",
65                    },
66                ],
67            ),
68            tags: Some(
69                [
70                    Unnecessary,
71                ],
72            ),
73            data: None,
74        },
75        fix: None,
76    },
77    MappedRustDiagnostic {
78        url: Url {
79            scheme: "file",
80            cannot_be_a_base: false,
81            username: "",
82            password: None,
83            host: None,
84            port: None,
85            path: "/test/driver/subcommand/repl.rs",
86            query: None,
87            fragment: None,
88        },
89        diagnostic: Diagnostic {
90            range: Range {
91                start: Position {
92                    line: 290,
93                    character: 8,
94                },
95                end: Position {
96                    line: 290,
97                    character: 11,
98                },
99            },
100            severity: Some(
101                Hint,
102            ),
103            code: Some(
104                String(
105                    "unused_variables",
106                ),
107            ),
108            code_description: None,
109            source: Some(
110                "rustc",
111            ),
112            message: "consider prefixing with an underscore: `_foo`",
113            related_information: Some(
114                [
115                    DiagnosticRelatedInformation {
116                        location: Location {
117                            uri: Url {
118                                scheme: "file",
119                                cannot_be_a_base: false,
120                                username: "",
121                                password: None,
122                                host: None,
123                                port: None,
124                                path: "/test/driver/subcommand/repl.rs",
125                                query: None,
126                                fragment: None,
127                            },
128                            range: Range {
129                                start: Position {
130                                    line: 290,
131                                    character: 8,
132                                },
133                                end: Position {
134                                    line: 290,
135                                    character: 11,
136                                },
137                            },
138                        },
139                        message: "original diagnostic",
140                    },
141                ],
142            ),
143            tags: None,
144            data: None,
145        },
146        fix: Some(
147            Fix {
148                ranges: [
149                    Range {
150                        start: Position {
151                            line: 290,
152                            character: 8,
153                        },
154                        end: Position {
155                            line: 290,
156                            character: 11,
157                        },
158                    },
159                ],
160                action: CodeAction {
161                    title: "consider prefixing with an underscore: `_foo`",
162                    group: None,
163                    kind: Some(
164                        CodeActionKind(
165                            "quickfix",
166                        ),
167                    ),
168                    command: None,
169                    edit: Some(
170                        SnippetWorkspaceEdit {
171                            changes: Some(
172                                {
173                                    Url {
174                                        scheme: "file",
175                                        cannot_be_a_base: false,
176                                        username: "",
177                                        password: None,
178                                        host: None,
179                                        port: None,
180                                        path: "/test/driver/subcommand/repl.rs",
181                                        query: None,
182                                        fragment: None,
183                                    }: [
184                                        TextEdit {
185                                            range: Range {
186                                                start: Position {
187                                                    line: 290,
188                                                    character: 8,
189                                                },
190                                                end: Position {
191                                                    line: 290,
192                                                    character: 11,
193                                                },
194                                            },
195                                            new_text: "_foo",
196                                        },
197                                    ],
198                                },
199                            ),
200                            document_changes: None,
201                            change_annotations: None,
202                        },
203                    ),
204                    is_preferred: Some(
205                        true,
206                    ),
207                    data: None,
208                },
209            },
210        ),
211    },
212]
213