Commit 586aeb4
authored
Rollup merge of rust-lang#64058 - phansch:refactor_out_method, r=estebank
librustc_errors: Extract sugg/subst handling into method
An initial refactoring before working on rust-lang#61809.
This moves the whole block into a method so that it can be reused in the
annotate-snippet emitter. The method is already used in the new emitter, but
there's no UI tests with suggestions included in this PR.
A first look at some UI tests with suggestions showed that there's some
more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the new output is closer to the
current one, so I opted to do that in a second step.
r? @estebank
[annotate-snippet-rs]: https://github.com/rust-lang/annotate-snippets-rsFile tree
2 files changed
+32
-12
lines changed- src/librustc_errors
2 files changed
+32
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | | - | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | 194 | | |
196 | | - | |
197 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
198 | 209 | | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | 210 | | |
203 | 211 | | |
| 212 | + | |
204 | 213 | | |
205 | 214 | | |
206 | 215 | | |
| |||
216 | 225 | | |
217 | 226 | | |
218 | 227 | | |
219 | | - | |
220 | | - | |
| 228 | + | |
| 229 | + | |
221 | 230 | | |
222 | 231 | | |
| 232 | + | |
223 | 233 | | |
224 | 234 | | |
225 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
226 | 239 | | |
227 | 240 | | |
228 | 241 | | |
229 | 242 | | |
230 | 243 | | |
231 | | - | |
| 244 | + | |
232 | 245 | | |
| 246 | + | |
| 247 | + | |
233 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
234 | 256 | | |
235 | 257 | | |
236 | 258 | | |
| |||
0 commit comments