]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #89370 - RalfJung:ctfe-aggregate-rvalue, r=oli-obk
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 1 Oct 2021 01:05:26 +0000 (18:05 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Oct 2021 01:05:26 +0000 (18:05 -0700)
CTFE: tweak aggregate rvalue handling

I have not looked at this code in ages... I think Miri does not even hit it, since (most?) aggregate rvalues are lowered somewhere in the MIR pipeline, but CTFE does hit it.

So this adds some extra sanity assertions, and removes a ZST special case -- ZST should only be special cased fairly late (when the actual memory access happens); e.g. `!` is a ZST and we still want `copy_op` to be called for it since it will perform validation (and raise UB, since `!` is never valid).


Trivial merge