| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2019-07-07 | tests: Add tests that use const fns. | David Wood | -0/+39 | |
| 2019-07-07 | tests: Update and add tests for RFC 2203. | David Wood | -32/+96 | |
| 2019-07-07 | rustc_mir: Re-use `report_selection_error`. | David Wood | -12/+22 | |
| This commit replaces the new error that was being emitted in NLL type check with a call to `report_selection_error` so that the same trait error as before this PR is emitted. | ||||
| 2019-07-07 | syntax: Add feature gate. | David Wood | -3/+4 | |
| This commit adds a `const_in_array_repeat_expressions` feature gate and only create `Candidate::Repeat` if it is enabled. | ||||
| 2019-07-07 | rustc/rustc_mir: Implement RFC 2203. | David Wood | -0/+312 | |
| 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. | ||||
