summary refs log tree commit diff
path: root/src/test/ui/const-generics
AgeCommit message (Collapse)AuthorLines
2019-06-13typeck: Fix ICE for blocks in repeat expr count.David Wood-0/+34
This commit extends the work in #61698 to get the `DefId` of const parameters from block that resolve to a const parameter (as well as const parameters directly, as it was previously).
2019-06-11Rollup merge of #61698 - davidtwco:ice-const-generic-length, r=varkorMazdak Farrokhzad-0/+60
typeck: Fix const generic in repeat param ICE. Fixes #61336. Turns out this wasn't related to #49147 after all. r? @varkor
2019-06-10typeck: Fix const generic in repeat param ICE.David Wood-0/+60
This commit fixes an ICE that occured when a const generic was used in a repeat expression. This was due to the code expecting the length of the repeat expression to be const evaluatable to a constant, but a const generic parameter is not (however, it can be made into a constant).
2019-06-07Add test for deriving Debug for const genericsvarkor-0/+28
2019-06-07Add test for const generics struct constructorvarkor-0/+21
2019-06-04Rollup merge of #61409 - varkor:condition-trait-param-ice, r=oli-obkMazdak Farrokhzad-0/+18
Fix an ICE with a const argument in a trait This goes some way towards fixing https://github.com/rust-lang/rust/issues/61383 (the reduced test case is fixed).
2019-06-03Allow `true` and `false` in const generic argumentsvarkor-0/+2
2019-06-02Rollup merge of #61380 - varkor:expected-usize-got-param, r=eddybMazdak Farrokhzad-0/+63
Fix some issues with `unwrap_usize` instead of `assert_usize` Fixes https://github.com/rust-lang/rust/issues/61337. Fixes https://github.com/rust-lang/rust/issues/61341. Fixes https://github.com/rust-lang/rust/issues/61422. r? @eddyb
2019-06-02Add regression test for #61422varkor-0/+21
2019-06-02Fix unwrapping usize issue with transparent MaybeUnit array wrappervarkor-0/+17
2019-05-31Add test for condition in trait const paramvarkor-0/+16
2019-05-31Rollup merge of #61344 - varkor:const-failed-to-life-ice, r=CentrilPietro Albini-0/+24
Add regression test for const generics ICE Closes https://github.com/rust-lang/rust/issues/60879.
2019-05-31Fix unwrapping usize issue in HasMutInteriorvarkor-0/+25
2019-05-30Add regression test for const generics ICEvarkor-0/+24
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-05-30Rollup merge of #61333 - varkor:apit-const-param-ice, r=estebankMazdak Farrokhzad-0/+16
Fix ICE with APIT in a function with a const parameter Fixes https://github.com/rust-lang/rust/issues/60953.
2019-05-30Add a regression test for const parameters with impl Traitvarkor-0/+16
2019-05-29Fix ICE with struct ctors and const generics.David Wood-22/+20
This commit fixes a ICE where struct constructors were resulting in an ICE with const generics. Previously, a `match` in `type_of` did not have an arm for the `DefKind::Ctor` resolutions and therefore would assume that the type did not have generics.
2019-05-28Use assert_eq! instead of println! in testsvarkor-2/+2
2019-05-28Use Display rather than Debug printing for const mismatchvarkor-1/+1
2019-05-28Update tests after pretty printingvarkor-6/+6
2019-05-28Fix test after rebasevarkor-2/+13
2019-05-28Add broken MIR regression testsvarkor-0/+51
2019-05-28Add tests for uninferred consts during codegenvarkor-0/+48
2019-05-28Add a test for a function taking a const param array as an argumentvarkor-0/+22
2019-05-25Fix rebase falloutOliver Scherer-1/+1
2019-05-13Rollup merge of #60710 - varkor:delay_span_bug-const-parent, r=matthewjasperMazdak Farrokhzad-0/+60
Use `delay_span_bug` for error cases when checking `AnonConst` parent Fixes #60704. Fixes #60650.
2019-05-11Add test for const implvarkor-0/+22
2019-05-10Add a test for failed inference of const typesvarkor-0/+26
2019-05-10Add a test for invalid const argumentsvarkor-0/+34
2019-05-09Rollup merge of #60550 - skinny121:concrete_const_tests, r=varkorMazdak Farrokhzad-0/+50
Add tests for concrete const types In response to the request for help in https://github.com/rust-lang/rust/issues/44580#issuecomment-488819344, I have added several ui tests around the use of concrete const types, i.e. A<2>. r? @varkor
2019-05-08Add tests for concrete const typesben-0/+50
2019-05-07Auto merge of #60612 - Centril:rollup-61drhqt, r=Centrilbors-8/+2
Rollup of 5 pull requests Successful merges: - #60489 (Remove hamburger button from source code page) - #60535 (Correct handling of arguments in async fn) - #60579 (Rename `ParamTy::idx` to `ParamTy::index`) - #60583 (Fix parsing issue with negative literals as const generic arguments) - #60609 (Be a bit more explicit asserting over the vec rather than the len) Failed merges: r? @ghost
2019-05-07Auto merge of #60277 - estebank:relate-ice, r=varkorbors-0/+21
Don't ICE when relating const type args Fix #60263. r? @varkor
2019-05-06`token::LArrow` can begin argumentsvarkor-8/+2
`<-` may indicate the start of a negative const argument.
2019-05-04Early error for mixing order of const and type parametersvarkor-10/+10
2019-05-04Add testsvarkor-0/+29
2019-05-02Don't ICE when relating const type argsEsteban Küber-0/+21
2019-05-01Add a test for const args that cannot be inferredvarkor-0/+25
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Add a test for incorrect numbers of const argsvarkor-0/+32
2019-05-01Add a test for const argumentsvarkor-0/+19
2019-05-01Add `const-types` testvarkor-0/+22
2019-04-25Add comment explaining restrictionvarkor-4/+10
2019-04-25Add a test for const parameters with type parameters as typesvarkor-0/+31
2019-04-25Make sure const params with type params don't cause errors without a feature ↵varkor-0/+25
gate
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-1/+0
2019-04-18Auto merge of #60058 - varkor:const-generics-ty-refactor, r=cramertjbors-0/+14
Make const parameters enforce no variance constraints Fixes https://github.com/rust-lang/rust/issues/60047. Also includes some minor const refactoring for convenience.
2019-04-18Add a test for unused const parametersvarkor-0/+14
2019-04-17Resolve inconsistency in error messages between "parameter" and "variable".Eduard-Mihai Burtescu-1/+1
2019-03-22Fix ICE with const generic param in structvarkor-0/+21
2019-03-11Update testsVadim Petrochenkov-5/+5