diff options
| author | David Wood <david@davidtw.co> | 2019-05-26 12:57:00 +0100 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2019-07-07 19:51:09 +0100 |
| commit | 485a80255b13840551e08f34a268528bbb2a33d9 (patch) | |
| tree | edc48f1df7eb38a5e02501e74db6be5047ca3bbf /src/test/ui/thinlto | |
| parent | 9210359b18185f46af9c0f30cc3d2678394930ef (diff) | |
| download | rust-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
