This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit fb79597
authored
Rollup merge of rust-lang#87832 - wesleywiser:fix_match_step, r=davidtwco
Fix debugger stepping behavior with `match` expressions
Previously, we would set up the source lines for `match` expressions so
that the code generated to perform the test of the scrutinee was matched
to the line of the arm that required the test and then jump from the arm
block to the "next" block was matched to all of the lines in the `match`
expression.
While that makes sense, it has the side effect of causing strange
stepping behavior in debuggers.
I've changed the source information so that all of the generated tests
are sourced to `match {scrutinee}` and the jumps are sourced to the last
line of the block they are inside. This resolves the weird stepping
behavior in all debuggers and resolves some instances of "ambiguous
symbol" errors in WinDbg preventing the user from setting breakpoints at
`match` expressions.
Before:
https://user-images.githubusercontent.com/831192/128577421-ee0c9c03-da28-4d16-997a-d57988a7bb7f.mp4
After:
https://user-images.githubusercontent.com/831192/128577433-2ceab04d-953e-4e31-9387-93f049c71ff3.mp4
Fixes rust-lang#87817File tree
93 files changed
+916
-482
lines changed- compiler/rustc_mir_build/src/build/matches
- src/test
- debuginfo
- mir-opt
- const_prop
- issues
- ui
- borrowck
- consts/miri_unleashed
- issues
- nll
- rfc-2008-non-exhaustive
- union
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
93 files changed
+916
-482
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
148 | 155 | | |
149 | 156 | | |
150 | 157 | | |
| |||
224 | 231 | | |
225 | 232 | | |
226 | 233 | | |
| 234 | + | |
227 | 235 | | |
228 | 236 | | |
229 | 237 | | |
| |||
236 | 244 | | |
237 | 245 | | |
238 | 246 | | |
239 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
240 | 255 | | |
241 | 256 | | |
242 | 257 | | |
| |||
339 | 354 | | |
340 | 355 | | |
341 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
342 | 360 | | |
343 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
344 | 365 | | |
345 | 366 | | |
346 | 367 | | |
| |||
533 | 554 | | |
534 | 555 | | |
535 | 556 | | |
536 | | - | |
537 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
538 | 564 | | |
539 | 565 | | |
540 | 566 | | |
| |||
993 | 1019 | | |
994 | 1020 | | |
995 | 1021 | | |
| 1022 | + | |
996 | 1023 | | |
997 | 1024 | | |
998 | 1025 | | |
| |||
1022 | 1049 | | |
1023 | 1050 | | |
1024 | 1051 | | |
| 1052 | + | |
1025 | 1053 | | |
1026 | 1054 | | |
1027 | 1055 | | |
| |||
1030 | 1058 | | |
1031 | 1059 | | |
1032 | 1060 | | |
| 1061 | + | |
1033 | 1062 | | |
1034 | 1063 | | |
1035 | 1064 | | |
| |||
1042 | 1071 | | |
1043 | 1072 | | |
1044 | 1073 | | |
| 1074 | + | |
1045 | 1075 | | |
1046 | 1076 | | |
1047 | 1077 | | |
| |||
1087 | 1117 | | |
1088 | 1118 | | |
1089 | 1119 | | |
| 1120 | + | |
1090 | 1121 | | |
1091 | 1122 | | |
1092 | 1123 | | |
| |||
1257 | 1288 | | |
1258 | 1289 | | |
1259 | 1290 | | |
| 1291 | + | |
1260 | 1292 | | |
1261 | 1293 | | |
1262 | 1294 | | |
| |||
1269 | 1301 | | |
1270 | 1302 | | |
1271 | 1303 | | |
1272 | | - | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
1273 | 1312 | | |
1274 | 1313 | | |
1275 | 1314 | | |
| |||
1302 | 1341 | | |
1303 | 1342 | | |
1304 | 1343 | | |
| 1344 | + | |
1305 | 1345 | | |
1306 | 1346 | | |
1307 | 1347 | | |
| |||
1330 | 1370 | | |
1331 | 1371 | | |
1332 | 1372 | | |
| 1373 | + | |
1333 | 1374 | | |
1334 | 1375 | | |
1335 | 1376 | | |
| |||
1497 | 1538 | | |
1498 | 1539 | | |
1499 | 1540 | | |
| 1541 | + | |
1500 | 1542 | | |
1501 | 1543 | | |
1502 | 1544 | | |
| |||
1591 | 1633 | | |
1592 | 1634 | | |
1593 | 1635 | | |
| 1636 | + | |
1594 | 1637 | | |
1595 | 1638 | | |
1596 | 1639 | | |
| |||
1607 | 1650 | | |
1608 | 1651 | | |
1609 | 1652 | | |
| 1653 | + | |
1610 | 1654 | | |
1611 | 1655 | | |
1612 | 1656 | | |
| |||
1617 | 1661 | | |
1618 | 1662 | | |
1619 | 1663 | | |
1620 | | - | |
| 1664 | + | |
1621 | 1665 | | |
1622 | 1666 | | |
1623 | 1667 | | |
| |||
1713 | 1757 | | |
1714 | 1758 | | |
1715 | 1759 | | |
| 1760 | + | |
1716 | 1761 | | |
1717 | 1762 | | |
1718 | 1763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
| 156 | + | |
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
| |||
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
209 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
210 | 218 | | |
211 | 219 | | |
212 | | - | |
| 220 | + | |
213 | 221 | | |
214 | 222 | | |
215 | 223 | | |
| |||
246 | 254 | | |
247 | 255 | | |
248 | 256 | | |
249 | | - | |
| 257 | + | |
250 | 258 | | |
251 | 259 | | |
252 | 260 | | |
| |||
0 commit comments