diff options
| author | Guillaume Boisseau <Nadrieril@users.noreply.github.com> | 2024-02-17 11:23:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-17 11:23:03 +0100 |
| commit | f70f13a1d3437041dee4c536f2872fae02c2f3e8 (patch) | |
| tree | 39b1d7bc84149fe9a699f0ea73525d3983a1c583 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 5f2160946317d2ee0a04e55550a0e3cc2dfa63e0 (diff) | |
| parent | 340f8aac7e2da164134338986b46fb4a26fe185b (diff) | |
| download | rust-f70f13a1d3437041dee4c536f2872fae02c2f3e8.tar.gz rust-f70f13a1d3437041dee4c536f2872fae02c2f3e8.zip | |
Rollup merge of #120932 - RalfJung:mut-ptr-to-static, r=oli-obk
const_mut_refs: allow mutable pointers to statics Fixes https://github.com/rust-lang/rust/issues/118447 Writing this PR became a bit messy, see [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Statics.20pointing.20to.20interior.20mutable.20statics) for some of my journey.^^ Turns out there was a long-standing bug in our qualif logic that led to us incorrectly classifying certain places as "no interior mut" when they actually had interior mut. Due to that the `const_refs_to_cell` feature gate was required far less often than it otherwise would, e.g. in [this code](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=9e0c042c451b3d11d64dd6263679a164). Fixing this however would be a massive breaking change all over libcore and likely the wider ecosystem. So I also changed the const-checking logic to just not require the feature gate for the affected cases. While doing so I discovered a bunch of logic that is not explained and that I could not explain. However I think stabilizing some const-eval feature will make most of that logic inconsequential so I just added some FIXMEs and left it at that. r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
