summary refs log tree commit diff
path: root/src/test/ui/const-generics/issues
AgeCommit message (Collapse)AuthorLines
2020-12-05Const parameters can not be inferred with `_`Ethan Brierley-0/+2
Small improvement. Thanks varkor Co-authored-by: varkor <github@varkor.com> Bless
2020-11-29Update tests to remove old numeric constantsbstrie-16/+16
Part of #68490. Care has been taken to leave the old consts where appropriate, for testing backcompat regressions, module shadowing, etc. The intrinsics docs were accidentally referring to some methods on f64 as std::f64, which I changed due to being contrary with how we normally disambiguate the shadow module from the primitive. In one other place I changed std::u8 to std::ops since it was just testing path handling in macros. For places which have legitimate uses of the old consts, deprecated attributes have been optimistically inserted. Although currently unnecessary, they exist to emphasize to any future deprecation effort the necessity of these specific symbols and prevent them from being accidentally removed.
2020-11-24Swap note for helpmendess-33/+33
2020-11-24Requested changesmendess-14/+17
2020-11-24Add note to use nightly when using expr in const genericsmendess-0/+14
2020-11-16improve error message for const ty param mismatchBastian Kauschke-16/+9
2020-10-22min_const_generics: allow ty param in repeat exprBastian Kauschke-15/+20
2020-10-17Suggest minimal subset features in `incomplete_features` lintYuki Okushi-0/+8
2020-10-12Bless expected errorsEthan Brierley-54/+54
2020-10-11`min_const_generics` diagnostics improvementsEthan Brierley-71/+71
2 3
2020-10-05Rollup merge of #77439 - varkor:min_const_generics-tests, r=lcnr,estebankDylan DPC-35/+35
Fix missing diagnostic span for `impl Trait` with const generics, and add various tests for `min_const_generics` and `const_generics` Closes https://github.com/rust-lang/rust/issues/61410. Adds `min_const_generics` tests for: - https://github.com/rust-lang/rust/issues/73727 - https://github.com/rust-lang/rust/issues/72293 - https://github.com/rust-lang/rust/issues/67375 - https://github.com/rust-lang/rust/issues/75153 - https://github.com/rust-lang/rust/issues/71922 - https://github.com/rust-lang/rust/issues/69913 - https://github.com/rust-lang/rust/issues/67945 - https://github.com/rust-lang/rust/issues/69239 Adds `const_generics` tests for: - https://github.com/rust-lang/rust/issues/67375 - https://github.com/rust-lang/rust/issues/75153 - https://github.com/rust-lang/rust/issues/71922 - https://github.com/rust-lang/rust/issues/69913 - https://github.com/rust-lang/rust/issues/67945 - https://github.com/rust-lang/rust/issues/69239 (I only added separate `min_const_generics` and `const_generics` tests if they were handled differently by the two features.) We need to figure out how to deduplicate when `const_generics` is stabilised, but we can discuss that later. For now, we should be checking neither feature breaks, so require regression tests for both. I've given them identical names when I've added both, which should make it easier to spot them later. r? @lcnr
2020-10-03Replace "non trivial" with "non-trivial"varkor-35/+35
2020-10-01Add a regression test for issue-75299Yuki Okushi-0/+11
2020-09-28const evaluatable: improve `TooGeneric` handlingBastian Kauschke-13/+1
2020-09-25Rollup merge of #77073 - lcnr:ty-trait-param, r=matthewjasperJonas Schievink-0/+21
dead_code: look at trait impls even if they don't contain items fixes #70225
2020-09-24update testsBastian Kauschke-1/+1
2020-09-22dead_code: look at trait impls even if they don't contain itemsBastian Kauschke-0/+21
2020-09-21Rollup merge of #76581 - lcnr:bound-too-generic, r=eddybecstatic-morse-0/+124
do not ICE on bound variables, return `TooGeneric` instead fixes #73260, fixes #74634, fixes #76595 r? @nikomatsakis
2020-09-21add testsBastian Kauschke-0/+45
2020-09-20update stderr fileBastian Kauschke-2/+1
2020-09-20do not ICE on `ty::Bound` in Layout::computeBastian Kauschke-0/+39
2020-09-20miri: correctly deal with `ConstKind::Bound`Bastian Kauschke-0/+86
2020-09-15This commit introduces the following changes:Hameer Abbasi-3/+57
* Change error message for type param in a const expression when using min_const_generics * Change ParamInNonTrivialAnonConst to contain an extra bool used for distinguishing whether the passed-in symbol is a type or a value.
2020-09-13bless testsBastian Kauschke-4/+8
2020-09-10Respond to review comments.Hameer Abbasi-74/+7
2020-09-09Add revisions to const generic issue UI tests.Hameer Abbasi-149/+467
2020-09-07Add regression test and help notekadmin-0/+39
2020-09-02pretty: trim paths of unique symbolsDan Aloni-22/+22
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-31Fix duplicate error messages in const_generics testsAmjad Alsharafi-30/+18
2020-08-26Fixed file formatting and made `tidy` happyAmjad Alsharafi-1/+2
2020-08-26Added more min_const_generics revisions to testsAmjad Alsharafi-157/+224
2020-08-26Added a lot of min_const_generics revisionsAmjad Alsharafi-69/+202
2020-08-18change const param ty warning messageBastian Kauschke-10/+10
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-0/+15
2020-08-08Auto merge of #74877 - lcnr:min_const_generics, r=oli-obkbors-47/+136
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-45/+134
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-2/+2
2020-08-04Add regression testkadmin-0/+37
2020-08-04Add regression testkadmin-0/+74
As well as matching error outputs
2020-07-26Add test for issue-56445Yuki Okushi-0/+32
2020-07-17add test for #62878Bastian Kauschke-0/+48
2020-07-16Rollup merge of #74392 - lcnr:const-generics-update, r=varkorManish Goregaokar-0/+81
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 #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 #71169Bastian Kauschke-0/+27
2020-07-16add regression test for #68596Bastian Kauschke-0/+18