File tree Expand file tree Collapse file tree 3 files changed +272
-49
lines changed
crates/rust-analyzer/src/diagnostics Expand file tree Collapse file tree 3 files changed +272
-49
lines changed Original file line number Diff line number Diff line change 21
21
character: 26,
22
22
},
23
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
+ },
24
112
severity: Some(
25
113
Error,
26
114
),
53
141
"rustc",
54
142
),
55
143
message: "can\'t compare `{integer}` with `&str`\nthe trait `std::cmp::PartialEq<&str>` is not implemented for `{integer}`",
56
- related_information: None,
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
+ ),
57
173
tags: None,
58
174
data: None,
59
175
},
Original file line number Diff line number Diff line change 13
13
diagnostic: Diagnostic {
14
14
range: Range {
15
15
start: Position {
16
- line: 264 ,
16
+ line: 271 ,
17
17
character: 8,
18
18
},
19
19
end: Position {
20
- line: 264 ,
21
- character: 76 ,
20
+ line: 271 ,
21
+ character: 50 ,
22
22
},
23
23
},
24
24
severity: Some(
25
- Error ,
25
+ Hint ,
26
26
),
27
27
code: None,
28
28
code_description: None,
40
40
password: None,
41
41
host: None,
42
42
port: None,
43
- path: "/test/crates/hir_def/src/data .rs",
43
+ path: "/test/crates/hir_def/src/path .rs",
44
44
query: None,
45
45
fragment: None,
46
46
},
47
47
range: Range {
48
48
start: Position {
49
- line: 79 ,
50
- character: 15 ,
49
+ line: 264 ,
50
+ character: 8 ,
51
51
},
52
52
end: Position {
53
- line: 79 ,
54
- character: 41 ,
53
+ line: 264 ,
54
+ character: 76 ,
55
55
},
56
56
},
57
57
},
86
86
character: 41,
87
87
},
88
88
},
89
+ severity: Some(
90
+ Hint,
91
+ ),
92
+ code: None,
93
+ code_description: None,
94
+ source: Some(
95
+ "rustc",
96
+ ),
97
+ message: "Please register your known path in the path module",
98
+ related_information: Some(
99
+ [
100
+ DiagnosticRelatedInformation {
101
+ location: Location {
102
+ uri: Url {
103
+ scheme: "file",
104
+ username: "",
105
+ password: None,
106
+ host: None,
107
+ port: None,
108
+ path: "/test/crates/hir_def/src/path.rs",
109
+ query: None,
110
+ fragment: None,
111
+ },
112
+ range: Range {
113
+ start: Position {
114
+ line: 264,
115
+ character: 8,
116
+ },
117
+ end: Position {
118
+ line: 264,
119
+ character: 76,
120
+ },
121
+ },
122
+ },
123
+ message: "Exact error occurred here",
124
+ },
125
+ ],
126
+ ),
127
+ tags: None,
128
+ data: None,
129
+ },
130
+ fixes: [],
131
+ },
132
+ MappedRustDiagnostic {
133
+ url: Url {
134
+ scheme: "file",
135
+ username: "",
136
+ password: None,
137
+ host: None,
138
+ port: None,
139
+ path: "/test/crates/hir_def/src/path.rs",
140
+ query: None,
141
+ fragment: None,
142
+ },
143
+ diagnostic: Diagnostic {
144
+ range: Range {
145
+ start: Position {
146
+ line: 264,
147
+ character: 8,
148
+ },
149
+ end: Position {
150
+ line: 264,
151
+ character: 76,
152
+ },
153
+ },
89
154
severity: Some(
90
155
Error,
91
156
),
95
160
"rustc",
96
161
),
97
162
message: "Please register your known path in the path module",
98
- related_information: None,
163
+ related_information: Some(
164
+ [
165
+ DiagnosticRelatedInformation {
166
+ location: Location {
167
+ uri: Url {
168
+ scheme: "file",
169
+ username: "",
170
+ password: None,
171
+ host: None,
172
+ port: None,
173
+ path: "/test/crates/hir_def/src/path.rs",
174
+ query: None,
175
+ fragment: None,
176
+ },
177
+ range: Range {
178
+ start: Position {
179
+ line: 271,
180
+ character: 8,
181
+ },
182
+ end: Position {
183
+ line: 271,
184
+ character: 50,
185
+ },
186
+ },
187
+ },
188
+ message: "Error originated from macro call here",
189
+ },
190
+ DiagnosticRelatedInformation {
191
+ location: Location {
192
+ uri: Url {
193
+ scheme: "file",
194
+ username: "",
195
+ password: None,
196
+ host: None,
197
+ port: None,
198
+ path: "/test/crates/hir_def/src/data.rs",
199
+ query: None,
200
+ fragment: None,
201
+ },
202
+ range: Range {
203
+ start: Position {
204
+ line: 79,
205
+ character: 15,
206
+ },
207
+ end: Position {
208
+ line: 79,
209
+ character: 41,
210
+ },
211
+ },
212
+ },
213
+ message: "Error originated from macro call here",
214
+ },
215
+ ],
216
+ ),
99
217
tags: None,
100
218
data: None,
101
219
},
You can’t perform that action at this time.
0 commit comments