diff options
| author | bors <bors@rust-lang.org> | 2020-09-20 06:20:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-20 06:20:16 +0000 |
| commit | 10b3595ba6a4c658c9dea105488fc562c815e434 (patch) | |
| tree | a046e0f117492c34779ca4293f4c10d4fd66c9f0 /compiler/rustc_codegen_llvm/src | |
| parent | a3bc0e752fad96f537b73f4e9bc805a73d404f7b (diff) | |
| parent | 9216eb825839ecd17d67c2731537e5d6afffc54a (diff) | |
| download | rust-10b3595ba6a4c658c9dea105488fc562c815e434.tar.gz rust-10b3595ba6a4c658c9dea105488fc562c815e434.zip | |
Auto merge of #76411 - RalfJung:promote-in-const-fn, r=ecstatic-morse
Some promotion cleanup Based on top of both https://github.com/rust-lang/rust/pull/75502 and https://github.com/rust-lang/rust/pull/75585, this does some cleanup of the promotion code. The last 2 commits are new. * Remove the remaining cases where `const fn` is treated different from `fn`. This means no longer promoting ptr-to-int casts, raw ptr operations, and union field accesses in `const fn` -- or anywhere, for that matter. These are all unstable in const-context so this should not break any stable code. Fixes https://github.com/rust-lang/rust/issues/75586. * ~~Promote references to statics even outside statics (i.e., in functions) for consistency.~~ * Promote `&mut []` everywhere, not just in non-`const` functions, for consistency. * Explain why we do not promote deref's of statics outside statics. ~~(This is the only remaining direct user of `const_kind`.)~~ This can only land once the other two PRs land; I am mostly putting this up already because I couldn't wait ;) and to get some feedback from `@rust-lang/wg-const-eval` .
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
