]> git.lizzy.rs Git - rust.git/blob - crates/rust-analyzer/src/diagnostics/test_data/handles_macro_location.txt
Improve rustc diagnostic mapping
[rust.git] / crates / rust-analyzer / src / diagnostics / test_data / handles_macro_location.txt
1 [
2     MappedRustDiagnostic {
3         url: Url {
4             scheme: "file",
5             username: "",
6             password: None,
7             host: None,
8             port: None,
9             path: "/test/src/main.rs",
10             query: None,
11             fragment: None,
12         },
13         diagnostic: Diagnostic {
14             range: Range {
15                 start: Position {
16                     line: 1,
17                     character: 4,
18                 },
19                 end: Position {
20                     line: 1,
21                     character: 26,
22                 },
23             },
24             severity: Some(
25                 Hint,
26             ),
27             code: Some(
28                 String(
29                     "E0277",
30                 ),
31             ),
32             code_description: Some(
33                 CodeDescription {
34                     href: Url {
35                         scheme: "https",
36                         username: "",
37                         password: None,
38                         host: Some(
39                             Domain(
40                                 "doc.rust-lang.org",
41                             ),
42                         ),
43                         port: None,
44                         path: "/error-index.html",
45                         query: None,
46                         fragment: Some(
47                             "E0277",
48                         ),
49                     },
50                 },
51             ),
52             source: Some(
53                 "rustc",
54             ),
55             message: "can\'t compare `{integer}` with `&str`\nthe trait `std::cmp::PartialEq<&str>` is not implemented for `{integer}`",
56             related_information: Some(
57                 [
58                     DiagnosticRelatedInformation {
59                         location: Location {
60                             uri: Url {
61                                 scheme: "file",
62                                 username: "",
63                                 password: None,
64                                 host: None,
65                                 port: None,
66                                 path: "/test/%3C::core::macros::assert_eq%20macros%3E",
67                                 query: None,
68                                 fragment: None,
69                             },
70                             range: Range {
71                                 start: Position {
72                                     line: 6,
73                                     character: 30,
74                                 },
75                                 end: Position {
76                                     line: 6,
77                                     character: 32,
78                                 },
79                             },
80                         },
81                         message: "Exact error occurred here",
82                     },
83                 ],
84             ),
85             tags: None,
86             data: None,
87         },
88         fixes: [],
89     },
90     MappedRustDiagnostic {
91         url: Url {
92             scheme: "file",
93             username: "",
94             password: None,
95             host: None,
96             port: None,
97             path: "/test/%3C::core::macros::assert_eq%20macros%3E",
98             query: None,
99             fragment: None,
100         },
101         diagnostic: Diagnostic {
102             range: Range {
103                 start: Position {
104                     line: 6,
105                     character: 30,
106                 },
107                 end: Position {
108                     line: 6,
109                     character: 32,
110                 },
111             },
112             severity: Some(
113                 Error,
114             ),
115             code: Some(
116                 String(
117                     "E0277",
118                 ),
119             ),
120             code_description: Some(
121                 CodeDescription {
122                     href: Url {
123                         scheme: "https",
124                         username: "",
125                         password: None,
126                         host: Some(
127                             Domain(
128                                 "doc.rust-lang.org",
129                             ),
130                         ),
131                         port: None,
132                         path: "/error-index.html",
133                         query: None,
134                         fragment: Some(
135                             "E0277",
136                         ),
137                     },
138                 },
139             ),
140             source: Some(
141                 "rustc",
142             ),
143             message: "can\'t compare `{integer}` with `&str`\nthe trait `std::cmp::PartialEq<&str>` is not implemented for `{integer}`",
144             related_information: Some(
145                 [
146                     DiagnosticRelatedInformation {
147                         location: Location {
148                             uri: Url {
149                                 scheme: "file",
150                                 username: "",
151                                 password: None,
152                                 host: None,
153                                 port: None,
154                                 path: "/test/src/main.rs",
155                                 query: None,
156                                 fragment: None,
157                             },
158                             range: Range {
159                                 start: Position {
160                                     line: 1,
161                                     character: 4,
162                                 },
163                                 end: Position {
164                                     line: 1,
165                                     character: 26,
166                                 },
167                             },
168                         },
169                         message: "Error originated from macro call here",
170                     },
171                 ],
172             ),
173             tags: None,
174             data: None,
175         },
176         fixes: [],
177     },
178 ]