about summary refs log tree commit diff
path: root/src/test/ui/const-generics
AgeCommit message (Collapse)AuthorLines
2020-06-28Add test for issue-72352Yuki Okushi-0/+29
2020-06-28Add test for issue-71611Yuki Okushi-0/+17
2020-06-28Add test for issue-71382Yuki Okushi-0/+32
2020-06-27Add test for issue-71381Yuki Okushi-0/+47
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-20/+20
propagation
2020-06-23Rollup merge of #73398 - oli-obk:const_raw_ptr_cmp, r=varkor,RalfJung,nagisaManish Goregaokar-66/+56
A way forward for pointer equality in const eval r? @varkor on the first commit and @RalfJung on the second commit cc #53020
2020-06-23Rollup merge of #72271 - rakshith-ravi:master, r=varkorManish Goregaokar-0/+1
Improve compiler error message for wrong generic parameter order - Added optional "help" parameter that shows a help message on the compiler error if required. - Added a simple ordered parameter as a sample help. @varkor will make more changes as required. Let me know if I'm heading in the right direction. Fixes #68437 r? @varkor
2020-06-20Rollup merge of #72600 - Aaron1011:fix/anon-const-encoding, r=varkorRalf Jung-0/+23
Properly encode AnonConst into crate metadata Fixes #68104 Previous, we were encoding AnonConst as a regular Const, causing us to treat them differently after being deserialized in another compilation session.
2020-06-20Squashed all commitsRakshith Ravi-0/+1
2020-06-19Remove the const_raw_ptr_comparison feature gate.Oliver Scherer-66/+56
We can never supply a meaningful implementation of this. Instead, the follow up commits will create two intrinsics that approximate comparisons: * `ptr_maybe_eq` * `ptr_maybe_ne` The fact that `ptr_maybe_eq(a, b)` is not necessarily the same value as `!ptr_maybe_ne(a, b)` is a symptom of this entire problem.
2020-06-08fixup! Add regression test for const generic ICE in #72819Ayaz Hafiz-1/+1
2020-06-08fixup! Add regression test for const generic ICE in #72819Ayaz Hafiz-0/+3
2020-06-06fixup! Add regression test for const generic ICE in #72819Ayaz Hafiz-1/+2
2020-06-06Add regression test for const generic ICE in #72819Ayaz Hafiz-0/+26
Closes #72819
2020-06-02update testsBastian Kauschke-6/+32
2020-06-02add WellFormedConst predicateBastian Kauschke-10/+140
2020-05-29Rollup merge of #71095 - pickfire:box-from-array, r=dtolnayRalf Jung-6/+25
impl From<[T; N]> for Box<[T]> Based on https://github.com/rust-lang/rust/pull/68692
2020-05-26Properly encode AnonConst into crate metadataAaron Hill-0/+23
Fixes #68104 Previous, we were encoding AnonConst as a regular Const, causing us to treat them differently after being deserialized in another compilation session.
2020-05-25Rollup merge of #72061 - lcnr:const-inference-test, r=eddybDylan DPC-0/+70
add regression tests for stalled_on const vars closes #70180 Afaict this has been fixed sometime after #70213 `trait_ref_type_vars` correctly adds const infers and I did not find any remaining `FIXME`s which correspond to this issue. https://github.com/rust-lang/rust/blob/7c59a81a5fcbaaca311f744cd7c68d99bfbb05d3/src/librustc_trait_selection/traits/fulfill.rs#L555-L557 Added both examples from the issue as regression tests and renamed `trait_ref_type_vars` -> `trait_ref_infer_vars`. r? @eddyb
2020-05-20impl From<[T; N]> for Box<[T]>Ivan Tham-6/+25
Based on https://github.com/rust-lang/rust/pull/68692
2020-05-19Rollup merge of #72066 - lcnr:const-type-info-err, r=varkorDylan DPC-0/+32
correctly handle uninferred consts fixes the ICE mentioned in https://github.com/rust-lang/rust/issues/70507#issuecomment-615268893 I originally tried to generalize `need_type_info_err` to also work with consts which was not as much fun as I hoped :sweat_smile: It might be easier to have some duplication here and handle consts separately. r? @varkor
2020-05-19Auto merge of #71447 - cuviper:unsized_cow, r=dtolnaybors-5/+5
impl From<Cow> for Box, Rc, and Arc These forward `Borrowed`/`Owned` values to existing `From` impls. - `Box<T>` is a fundamental type, so it would be a breaking change to add a blanket impl. Therefore, `From<Cow>` is only implemented for `[T]`, `str`, `CStr`, `OsStr`, and `Path`. - For `Rc<T>` and `Arc<T>`, `From<Cow>` is implemented for everything that implements `From` the borrowed and owned types separately.
2020-05-18correctly handle uninferred constsBastian Kauschke-0/+32
2020-05-17update testsBastian Kauschke-21/+11
2020-05-17the best way to fix bugs is by ignoring themBastian Kauschke-32/+0
2020-05-17merge lazy_normalization_consts into const_genericsBastian Kauschke-176/+61
2020-05-17explicitly handle errors in fulfillBastian Kauschke-14/+14
2020-05-17update tests and add relevant feature gate testBastian Kauschke-31/+123
2020-05-17Put lazy normalization behind a feature gateBen Lewis-39/+142
2020-05-17Add lazy normalization testsBen Lewis-3/+167
2020-05-16Rollup merge of #72045 - RalfJung:incomplete-unsound, r=petrochenkovRalf Jung-134/+201
Incomplete features can also be unsound Some incomplete features do not just ICE, they are also currently unsound (e.g. https://github.com/rust-lang/rust/pull/72029, and also `specialization` -- which is not yet marked incomplete but [should be](https://github.com/rust-lang/rust/pull/71420)). This makes the message reflect that. While at it I also added a link to the tracking issue, which hopefully should explain what is incomplete/unsound about the feature.
2020-05-11Rollup merge of #72052 - lcnr:const_pprint, r=ecstatic-morseDylan DPC-12/+12
display `ConstKind::Param`
2020-05-09add regression tests + improve method nameBastian Kauschke-0/+70
2020-05-09display `ConstKind::Param`Bastian Kauschke-12/+12
2020-05-09adjust testsRalf Jung-134/+201
2020-05-08add const-generics testBastian Kauschke-0/+29
2020-05-04Rollup merge of #71038 - lcnr:dyn_trait_structural_match, r=pnkfelixDylan DPC-0/+32
forbid `dyn Trait` in patterns Do not allow `&dyn Trait` as a generic const parameters. This also changes dyn trait in pattern from ICE to error. closes #63322 closes #70972 r? @eddyb
2020-04-30handle ByRef in relateBastian Kauschke-0/+53
2020-04-29emit err when using trait objects in patBastian Kauschke-1/+1
2020-04-29forbid `dyn Trait` in const genericsBastian Kauschke-0/+32
2020-04-29Rollup merge of #71286 - Alexendoo:test-issue-69654, r=Dylan-DPCDylan DPC-0/+32
Add regression test for #69654 closes #69654 r? @eddyb
2020-04-28Rollup merge of #71340 - Valloric:more-check-pass, r=nikomatsakisDylan DPC-2/+2
Moving more build-pass tests to check-pass One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277 --- <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/rust-lang/rust/71340) <!-- Reviewable:end -->
2020-04-23Moving more build-pass tests to check-passVal Markovic-2/+2
One or two tests became build-pass without the FIXME because they really needed build-pass (were failing without it). Helps with #62277
2020-04-22Bless From<Cow> UI changesJosh Stone-5/+5
2020-04-20Add error message for using type parameter as the type of a const parametervarkor-6/+10
2020-04-20Make the `structural_match` error diagnostic for const generics clearervarkor-6/+6
2020-04-18Add regression test for #69654Alex Macleod-0/+32
2020-04-14typeck: workaround WF hole in `to_const`.Eduard-Mihai Burtescu-8/+42
2020-04-13allow const generics in const fnBastian Kauschke-17/+4
2020-04-11rustc: Add a warning count upon completionRoccoDev-23/+107