rust/compiler/rustc_mir/src
bors 10b3595ba6 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` .
2020-09-20 06:20:16 +00:00
..
borrow_check Rollup merge of #76756 - matthiaskrgr:cl123ppy, r=Dylan-DPC 2020-09-16 12:24:17 -07:00
const_eval move guaranteed{ne,eq} implementation to compile-time machine 2020-09-12 10:10:52 +02:00
dataflow Auto merge of #72632 - jonas-schievink:dest-prop, r=oli-obk 2020-09-20 01:38:26 +00:00
interpret Rollup merge of #76757 - matthiaskrgr:clippy_try_into, r=lcnr 2020-09-19 11:47:52 +02:00
monomorphize Auto merge of #72412 - VFLashM:issue-72408-nested-closures-exponential, r=tmandry 2020-09-18 14:08:39 +00:00
transform Auto merge of #76411 - RalfJung:promote-in-const-fn, r=ecstatic-morse 2020-09-20 06:20:16 +00:00
util Rollup merge of #76794 - richkadel:graphviz-font, r=ecstatic-morse 2020-09-16 12:24:30 -07:00
lib.rs Implement a destination propagation pass 2020-09-18 21:23:00 +02:00
shim.rs Auto merge of #75346 - davidtwco:issue-69925-polymorphic-instancedef-fnptrshim, r=nikomatsakis 2020-09-20 04:15:43 +00:00