Commit c97d02c
committed
Auto merge of rust-lang#102394 - dingxiangfei2009:issue-102317, r=oli-obk
Fix unwind drop glue for if-then scopes
cc `@est31`
Fix rust-lang#102317
Fix rust-lang#99852
This PR fixes the drop glue for unwinding from a panic originated in a drop while breaking out for the else block in an `if-then` scope.
MIR validation does not fail for the synchronous versions of the test program, because `StorageDead` statements are skipped over in the unwinding process. It is only becoming a problem when it is inside a generator where `StorageDead` must be kept around.File tree
6 files changed
+76
-19
lines changed- compiler/rustc_mir_build/src/build
- expr
- matches
- src/test/ui
- let-else
- mir
6 files changed
+76
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 248 | | |
254 | 249 | | |
255 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1986 | 1986 | | |
1987 | 1987 | | |
1988 | 1988 | | |
1989 | | - | |
| 1989 | + | |
1990 | 1990 | | |
1991 | 1991 | | |
1992 | 1992 | | |
| |||
2301 | 2301 | | |
2302 | 2302 | | |
2303 | 2303 | | |
2304 | | - | |
| 2304 | + | |
2305 | 2305 | | |
2306 | 2306 | | |
2307 | 2307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
| 469 | + | |
| 470 | + | |
470 | 471 | | |
471 | | - | |
| 472 | + | |
472 | 473 | | |
473 | 474 | | |
474 | 475 | | |
| |||
510 | 511 | | |
511 | 512 | | |
512 | 513 | | |
| 514 | + | |
513 | 515 | | |
514 | 516 | | |
515 | 517 | | |
| |||
524 | 526 | | |
525 | 527 | | |
526 | 528 | | |
527 | | - | |
| 529 | + | |
528 | 530 | | |
529 | 531 | | |
530 | 532 | | |
| |||
997 | 999 | | |
998 | 1000 | | |
999 | 1001 | | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1004 | 1014 | | |
1005 | 1015 | | |
1006 | 1016 | | |
| |||
1009 | 1019 | | |
1010 | 1020 | | |
1011 | 1021 | | |
1012 | | - | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
1013 | 1028 | | |
1014 | 1029 | | |
1015 | 1030 | | |
| |||
1222 | 1237 | | |
1223 | 1238 | | |
1224 | 1239 | | |
| 1240 | + | |
| 1241 | + | |
1225 | 1242 | | |
1226 | 1243 | | |
1227 | 1244 | | |
1228 | 1245 | | |
1229 | 1246 | | |
1230 | 1247 | | |
| 1248 | + | |
1231 | 1249 | | |
1232 | 1250 | | |
1233 | 1251 | | |
1234 | | - | |
| 1252 | + | |
1235 | 1253 | | |
1236 | 1254 | | |
1237 | 1255 | | |
1238 | 1256 | | |
1239 | | - | |
| 1257 | + | |
1240 | 1258 | | |
1241 | 1259 | | |
1242 | 1260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments