unstably allow constants to refer to statics and read from immutable statics by RalfJung · Pull Request #119614 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jan 5, 2024

fmease

fmease

@bors bors added the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Feb 10, 2024

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Feb 10, 2024

@bors bors mentioned this pull request

Feb 10, 2024

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Feb 12, 2024
…li-obk

add another test for promoteds-in-static

rust-lang#119614 led to validation of promoteds recursing into statics. These statics can point to `static mut` and interior mutable `static` and do other things we don't allow in `const`, but promoteds are validated as `const`, so we get strange errors (saying "in `const`" when there is no const) and surprising validation failures.

rust-lang#120960 fixes that; this here adds another test.

r? `@oli-obk`
Fixes rust-lang#120968

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Feb 12, 2024
…li-obk

add another test for promoteds-in-static

rust-lang#119614 led to validation of promoteds recursing into statics. These statics can point to `static mut` and interior mutable `static` and do other things we don't allow in `const`, but promoteds are validated as `const`, so we get strange errors (saying "in `const`" when there is no const) and surprising validation failures.

rust-lang#120960 fixes that; this here adds another test.

r? ``@oli-obk``
Fixes rust-lang#120968

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Feb 13, 2024
Rollup merge of rust-lang#120970 - RalfJung:static-promoted-test, r=oli-obk

add another test for promoteds-in-static

rust-lang#119614 led to validation of promoteds recursing into statics. These statics can point to `static mut` and interior mutable `static` and do other things we don't allow in `const`, but promoteds are validated as `const`, so we get strange errors (saying "in `const`" when there is no const) and surprising validation failures.

rust-lang#120960 fixes that; this here adds another test.

r? ``@oli-obk``
Fixes rust-lang#120968

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request

Feb 13, 2024
add another test for promoteds-in-static

rust-lang/rust#119614 led to validation of promoteds recursing into statics. These statics can point to `static mut` and interior mutable `static` and do other things we don't allow in `const`, but promoteds are validated as `const`, so we get strange errors (saying "in `const`" when there is no const) and surprising validation failures.

rust-lang/rust#120960 fixes that; this here adds another test.

r? ``@oli-obk``
Fixes rust-lang/rust#120968

@ojeda ojeda mentioned this pull request

Feb 17, 2024

48 tasks

@ojeda ojeda mentioned this pull request

Feb 8, 2026

57 tasks