Commit 180fdff
committed
Auto merge of rust-lang#80654 - Aaron1011:fix/dummy-span-ctxt, r=wesleywiser
Properly handle `SyntaxContext` of dummy spans in incr comp
Fixes rust-lang#80336
Due to macro expansion, we may end up with spans with an invalid
location and non-root `SyntaxContext`. This commits preserves the
`SyntaxContext` of such spans in the incremental cache, and ensures
that we always hash the `SyntaxContext` when computing the `Fingerprint`
of a `Span`
Previously, we would discard the `SyntaxContext` during serialization to
the incremental cache, causing the span's `Fingerprint` to change across
compilation sessions.File tree
3 files changed
+32
-13
lines changed- compiler
- rustc_middle/src/ty/query
- rustc_span/src
- src/test/incremental
3 files changed
+32
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
864 | 866 | | |
865 | 867 | | |
866 | 868 | | |
867 | | - | |
868 | | - | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
869 | 872 | | |
870 | | - | |
| 873 | + | |
871 | 874 | | |
872 | 875 | | |
873 | 876 | | |
| |||
1057 | 1060 | | |
1058 | 1061 | | |
1059 | 1062 | | |
1060 | | - | |
| 1063 | + | |
| 1064 | + | |
1061 | 1065 | | |
1062 | 1066 | | |
1063 | 1067 | | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1067 | 1072 | | |
1068 | 1073 | | |
1069 | | - | |
1070 | | - | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1071 | 1077 | | |
1072 | 1078 | | |
| 1079 | + | |
| 1080 | + | |
1073 | 1081 | | |
1074 | 1082 | | |
1075 | 1083 | | |
1076 | 1084 | | |
1077 | | - | |
| 1085 | + | |
1078 | 1086 | | |
1079 | 1087 | | |
1080 | 1088 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1899 | 1899 | | |
1900 | 1900 | | |
1901 | 1901 | | |
1902 | | - | |
| 1902 | + | |
1903 | 1903 | | |
| 1904 | + | |
1904 | 1905 | | |
1905 | 1906 | | |
1906 | 1907 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments