summary refs log tree commit diff
path: root/src/test/ui/const-generics
AgeCommit message (Collapse)AuthorLines
2020-08-18change const param ty warning messageBastian Kauschke-77/+57
2020-08-18run wfcheck in parralel again, add test for 74950Bastian Kauschke-11/+73
2020-08-18move const param structural match checks to wfcheckBastian Kauschke-311/+40
2020-08-13Auto merge of #75322 - JulianKnodt:revisions, r=lcnrbors-853/+1325
Add a bunch of const-generic revisions for `min_const_generics` This adds a bunch of revisions to `const-generic` tests which is part of #75279, but doesn't cover everything. r? @lcnr
2020-08-12Flip order of const & typekadmin-1/+1
2020-08-12Update stderr fileskadmin-960/+85
And also fix some comments as suggested by lcnr
2020-08-12Add missing tests in root const-gen dirkadmin-102/+1182
2020-08-12Add a bunch of revisionskadmin-38/+305
This adds a bunch of revisions to const-generic tests
2020-08-11Rollup merge of #75359 - lcnr:unused-delims-trim, r=oli-obkYuki Okushi-1/+1
unused_delims: trim expr improves rustfix output.
2020-08-10Auto merge of #74005 - estebank:type-ascription-redux, r=petrochenkovbors-4/+1
Clean up errors in typeck and resolve * Tweak ordering of suggestions * Do not suggest similarly named enclosing item * Point at item definition in foreign crates * Add missing primary label CC #34255.
2020-08-10Do not suggest similarly named enclosing itemEsteban Küber-4/+1
2020-08-10unused_delims: trim exprBastian Kauschke-1/+1
2020-08-10Convert `Eq` impl to check Ord::Equalkadmin-1/+1
2020-08-09Change Ord impl for ParamKindOrdkadmin-46/+47
Updated tests and error msgs Update stderr from test Update w/ lcnr comments Change some tests around, and also updated Ord implementation for ParamKindOrd Update w/ nits from lcnr
2020-08-09Test lifetimes after types after consts forbiddenkadmin-4/+41
Added more complex test and changed error message
2020-08-09Added +1 test for only works w/ feat const genkadmin-1/+54
Added this test to ensure that reordering the parameters only works with the feature const generics enabled. Fixed nits Also added another test to verify that intermixed lifetimes are forbidden
2020-08-08Rm restriction on ord of default types w/ constskadmin-37/+18
2020-08-08Auto merge of #74877 - lcnr:min_const_generics, r=oli-obkbors-58/+313
Implement the `min_const_generics` feature gate Implements both https://github.com/rust-lang/lang-team/issues/37 and https://github.com/rust-lang/compiler-team/issues/332. Adds the new feature gate `#![feature(min_const_generics)]`. This feature gate adds the following limitations to using const generics: - generic parameters must only be used in types if they are trivial. (either `N` or `{ N }`) - generic parameters must be either integers, `bool` or `char`. We do allow arbitrary expressions in associated consts though, meaning that the following is allowed, even if `<[u8; 0] as Foo>::ASSOC` is not const evaluatable. ```rust trait Foo { const ASSOC: usize; } impl<const N: usize> Foo for [u8; N] { const ASSOC: usize = 64 / N; } ``` r? @varkor cc @eddyb @withoutboats
2020-08-07test min_const_generics using revisionsBastian Kauschke-52/+154
2020-08-06allow complex expressions in assoc constsBastian Kauschke-17/+19
2020-08-05Auto merge of #75166 - JulianKnodt:i64494, r=lcnrbors-0/+37
Add regression test for #64494 Add regression test to indicate if this compilation ever succeeds. Fixes #64494 r? @lcnr
2020-08-05impl reviewBastian Kauschke-8/+12
2020-08-05forbid complex types for generic parametersBastian Kauschke-0/+52
2020-08-05forbid generic params in complex constsBastian Kauschke-0/+95
2020-08-04Add regression testkadmin-0/+37
2020-08-04Add regression testkadmin-0/+74
As well as matching error outputs
2020-07-31Removed error check in order to prevent ICEkadmin-0/+177
2020-07-29Rollup merge of #74671 - rust-lang:const-generics-coerce-unsized, r=nikomatsakisYuki Okushi-0/+11
add const generics array coercion test
2020-07-27update testsBastian Kauschke-1/+10
2020-07-27forbid generic params inside of anon consts in ty defaultsBastian Kauschke-0/+33
2020-07-26Add test for issue-56445Yuki Okushi-0/+32
2020-07-26Auto merge of #74060 - kpp:remove_length_at_most_32, r=dtolnaybors-542/+181
Remove trait LengthAtMost32 This is a continuation of https://github.com/rust-lang/rust/pull/74026 preserving the original burrbull's commit. I talked to @burrbull, he suggested me to finish his PR.
2020-07-24Auto merge of #74676 - lcnr:generics-no-sort, r=varkorbors-2/+34
correctly deal with unsorted generic parameters We now stop sorting generic params and instead correctly handle unsorted params in the rest of the compiler. We still restrict const params to come after type params though, so this PR does not change anything which is visible to users. This might slightly influence perf, so let's prevent any unintentional rollups. @bors rollup=never r? @varkor
2020-07-23test usageBastian Kauschke-2/+15
2020-07-23add more complex param order testBastian Kauschke-1/+20
2020-07-23add const genericsBastian Kauschke-0/+11
2020-07-23tweak wordingBastian Kauschke-1/+1
Co-authored-by: varkor <github@varkor.com>
2020-07-22require type defaults to be after const generic parametersBastian Kauschke-0/+27
as if this is currently possible. HA!
2020-07-19Add test for an explicit non-'static lifetime in a const argumentGabriel Smith-0/+28
2020-07-18Rollup merge of #74445 - lcnr:const-generic-ty-decl, r=Dylan-DPCManish Goregaokar-0/+48
add test for #62878 forgot to push this as part of #74159 r? @Dylan-DPC
2020-07-17add test for #62878Bastian Kauschke-0/+48
2020-07-17Add regression test for #69414Alex Macleod-2/+5
Closes #69414 (no longer ICEs after #74159)
2020-07-16Rollup merge of #74392 - lcnr:const-generics-update, r=varkorManish Goregaokar-0/+273
const generics triage I went through all const generics issues and closed all issues which are already fixed. Some issues already have a regression test but were not closed. Also doing this as part of this PR. uff r? @eddyb @varkor closes #61936 closes #62878 closes #63695 closes #67144 closes #68596 closes #69816 closes #70217 closes #70507 closes #70586 closes #71348 closes #71805 closes #73120 closes #73508 closes #73730 closes #74255
2020-07-16add regression test for #74255Bastian Kauschke-0/+18
2020-07-16add regression test for #73730Bastian Kauschke-0/+17
2020-07-16add regression test for #73508Bastian Kauschke-0/+23
2020-07-16add regression test for #73491Bastian Kauschke-0/+9
2020-07-16add regression test for #73120Bastian Kauschke-0/+22
2020-07-16add regression test for #71805Bastian Kauschke-0/+41
2020-07-16add regression test for #71348Bastian Kauschke-0/+35