about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorDavid Wood <david@davidtw.co>2019-05-26 12:57:00 +0100
committerDavid Wood <david@davidtw.co>2019-07-07 19:51:09 +0100
commit485a80255b13840551e08f34a268528bbb2a33d9 (patch)
treeedc48f1df7eb38a5e02501e74db6be5047ca3bbf /src/test/ui/thinlto
parent9210359b18185f46af9c0f30cc3d2678394930ef (diff)
downloadrust-485a80255b13840551e08f34a268528bbb2a33d9.tar.gz
rust-485a80255b13840551e08f34a268528bbb2a33d9.zip
rustc/rustc_mir: Implement RFC 2203.
This commit implements RFC 2203, allowing constants in array repeat
expressions.

Firstly, the check that the array repeat expression implements `Copy` is
removed and re-implemented in `rustc_mir::borrow_check::nll::type_check`
by emitting an error when the MIR contains a `Operand::Move` and the
type does not implement `Copy`.

Next, the `qualify_consts` pass is modified to construct a
`Candidate::Repeat` when it would be correct to promote a array repeat
expression.

Finally, the `promote_consts` pass is modified to promote the candidates
previously identified.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions