Commit 2572e0e
authored
Rollup merge of #129170 - artemagvanian:span-to-location, r=celinval
Add an ability to convert between `Span` and `visit::Location`
AFAIK, there is no way to create a `Location` from a `Span` because its only field is private. This makes it impossible to use visitor methods like `visit_statement` or `visit_terminator`.
This PR adds an implementation for`From<Span>` for `Location` to fix this.
r? ```@celinval```1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
468 | 484 | | |
469 | 485 | | |
470 | 486 | | |
| |||
0 commit comments