Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add another test for promoteds-in-static #120970

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Feb 12, 2024

#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.

#120960 fixes that; this here adds another test.

r? @oli-obk
Fixes #120968

@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 Feb 12, 2024
@rustbot
Copy link
Collaborator

rustbot commented Feb 12, 2024

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@RalfJung RalfJung changed the title Static promoted test add another test for promoteds-in-static Feb 12, 2024
@oli-obk
Copy link
Contributor

oli-obk commented Feb 12, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 12, 2024

📌 Commit a313ffb has been approved by oli-obk

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 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
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#118983 (Warn on references casting to bigger memory layout)
 - rust-lang#119451 (Gate PR CI on clippy correctness lints)
 - rust-lang#120273 (compiletest: few naive improvements)
 - rust-lang#120889 (Implement Instant for UEFI)
 - rust-lang#120938 (Implement sys/thread for UEFI)
 - rust-lang#120950 (Fix async closures in CTFE)
 - rust-lang#120958 (Dejargonize `subst`)
 - rust-lang#120965 (Add lahfsahf and prfchw target feature)
 - rust-lang#120970 (add another test for promoteds-in-static)
 - rust-lang#120979 (Update books)

Failed merges:

 - rust-lang#120973 (allow static_mut_ref in some tests that specifically test mutable statics)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118983 (Warn on references casting to bigger memory layout)
 - rust-lang#119451 (Gate PR CI on clippy correctness lints)
 - rust-lang#120273 (compiletest: few naive improvements)
 - rust-lang#120950 (Fix async closures in CTFE)
 - rust-lang#120958 (Dejargonize `subst`)
 - rust-lang#120965 (Add lahfsahf and prfchw target feature)
 - rust-lang#120970 (add another test for promoteds-in-static)
 - rust-lang#120979 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f759c23 into rust-lang:master Feb 13, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 13, 2024
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
@RalfJung RalfJung deleted the static-promoted-test branch February 13, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: Fail to evaluate static slice with reference to internally-mutable data
4 participants