Commit af315b0
authored
Rollup merge of #145783 - Erk-:et-cetera-span, r=compiler-errors
add span to struct pattern rest (..)
Struct pattern rest (`..`) did not retain span information compared to normal fields. This patch adds span information for it.
The motivation of this patch comes from when I implemented this PR for Clippy: rust-lang/rust-clippy#15000 (comment)
It is possible to get the span of the Et cetera in a bit roundabout way, but I thought this would be nicer.File tree
18 files changed
+50
-40
lines changed- compiler
- rustc_ast_lowering/src
- rustc_ast_pretty/src/pprust
- rustc_ast/src
- rustc_hir_pretty/src
- rustc_hir_typeck/src
- rustc_hir/src
- rustc_parse/src/parser
- rustc_passes/src
- rustc_resolve/src
- src/tools
- clippy
- clippy_lints/src
- matches
- utils
- clippy_utils/src
- rustfmt/src
- tests/ui/stats
18 files changed
+50
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
937 | 937 | | |
938 | 938 | | |
939 | 939 | | |
940 | | - | |
| 940 | + | |
941 | 941 | | |
942 | 942 | | |
943 | 943 | | |
| |||
4051 | 4051 | | |
4052 | 4052 | | |
4053 | 4053 | | |
4054 | | - | |
4055 | | - | |
| 4054 | + | |
| 4055 | + | |
4056 | 4056 | | |
4057 | 4057 | | |
4058 | 4058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
1437 | | - | |
| 1437 | + | |
1438 | 1438 | | |
1439 | | - | |
1440 | | - | |
| 1439 | + | |
| 1440 | + | |
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2508 | 2508 | | |
2509 | 2509 | | |
2510 | 2510 | | |
2511 | | - | |
| 2511 | + | |
2512 | 2512 | | |
2513 | 2513 | | |
2514 | 2514 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1769 | 1769 | | |
1770 | 1770 | | |
1771 | 1771 | | |
1772 | | - | |
| 1772 | + | |
1773 | 1773 | | |
1774 | 1774 | | |
1775 | 1775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1884 | 1884 | | |
1885 | 1885 | | |
1886 | 1886 | | |
1887 | | - | |
1888 | | - | |
| 1887 | + | |
| 1888 | + | |
1889 | 1889 | | |
1890 | 1890 | | |
1891 | 1891 | | |
| |||
4979 | 4979 | | |
4980 | 4980 | | |
4981 | 4981 | | |
4982 | | - | |
4983 | | - | |
| 4982 | + | |
| 4983 | + | |
4984 | 4984 | | |
4985 | 4985 | | |
4986 | 4986 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1958 | 1958 | | |
1959 | 1959 | | |
1960 | 1960 | | |
1961 | | - | |
| 1961 | + | |
1962 | 1962 | | |
1963 | 1963 | | |
1964 | 1964 | | |
1965 | 1965 | | |
1966 | | - | |
| 1966 | + | |
1967 | 1967 | | |
1968 | 1968 | | |
1969 | 1969 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
609 | 617 | | |
610 | 618 | | |
611 | 619 | | |
| |||
2428 | 2436 | | |
2429 | 2437 | | |
2430 | 2438 | | |
2431 | | - | |
| 2439 | + | |
2432 | 2440 | | |
2433 | 2441 | | |
2434 | 2442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1516 | 1516 | | |
1517 | 1517 | | |
1518 | 1518 | | |
1519 | | - | |
| 1519 | + | |
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1583 | 1583 | | |
1584 | 1584 | | |
1585 | 1585 | | |
1586 | | - | |
| 1586 | + | |
1587 | 1587 | | |
1588 | 1588 | | |
1589 | 1589 | | |
| |||
0 commit comments