Commit 1b62bb6
authored
Rollup merge of rust-lang#71691 - ecstatic-morse:const-unreachable, r=oli-obk,RalfJung
Allow `Unreachable` terminators unconditionally in const-checking
If we ever actually reach an `Unreachable` terminator while executing, the MIR is ill-formed or the user's program is UB due to something like `unreachable_unchecked`. I don't think we need to forbid these in `qualify_min_const_fn`.
r? @oli-obk1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
| 344 | + | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| |||
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
| 360 | + | |
365 | 361 | | |
366 | 362 | | |
367 | 363 | | |
| |||
0 commit comments