This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit ed19532
committed
Auto merge of rust-lang#120960 - RalfJung:static-promoted-cycle, r=oli-obk
fix cycle error when a static and a promoted are mutually recursive
This also now allows promoteds everywhere to point to 'extern static', because why not? We still check that constants cannot transitively reach 'extern static' through references. (We allow it through raw pointers.)
r? `@oli-obk`
Fixes rust-lang#120949File tree
3 files changed
+29
-24
lines changed- compiler/rustc_const_eval/src
- const_eval
- interpret
- tests/ui/consts
3 files changed
+29
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 359 | + | |
366 | 360 | | |
367 | 361 | | |
368 | 362 | | |
369 | 363 | | |
370 | 364 | | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
| 365 | + | |
375 | 366 | | |
376 | 367 | | |
377 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | | - | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| 155 | + | |
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
| |||
476 | 480 | | |
477 | 481 | | |
478 | 482 | | |
| 483 | + | |
479 | 484 | | |
480 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
481 | 489 | | |
482 | 490 | | |
483 | 491 | | |
484 | 492 | | |
485 | 493 | | |
486 | 494 | | |
487 | | - | |
| 495 | + | |
488 | 496 | | |
489 | 497 | | |
490 | 498 | | |
491 | | - | |
492 | | - | |
493 | | - | |
| 499 | + | |
494 | 500 | | |
495 | 501 | | |
496 | 502 | | |
497 | 503 | | |
498 | 504 | | |
499 | 505 | | |
| 506 | + | |
500 | 507 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
| 508 | + | |
507 | 509 | | |
508 | 510 | | |
509 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments