about summary refs log tree commit diff
path: root/src/test/ui/const-generics
AgeCommit message (Collapse)AuthorLines
2019-10-20Fix resolve_type_vars_with_obligations not resolving const inferenceben-8/+8
variables.
2019-10-16update ui testsGuillaume Gomez-0/+1
2019-10-14Rollup merge of #65398 - estebank:capitalization-only, r=varkorTyler Mandry-1/+1
Bring attention to suggestions when the only difference is capitalization CC #65386.
2019-10-15Include const generic arguments in metadata.ben-0/+52
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-1/+1
2019-10-11Rollup merge of #65191 - varkor:const-generics-test-cases, r=nikomatsakisTyler Mandry-0/+32
Add some regression tests - Add a test for #62187. - Clean up the directory structure in `src/test/ui/const-generics` - Closes #64792. - Closes #57399. - Closes #57271.
2019-10-10Pretty print raw pointers in consts as '{pointer}'.ben-3/+3
2019-10-09Update ui testsben-6/+6
2019-10-09Refactor pretty print const to use a big match statementben-2/+2
2019-10-09Gate use of raw and function pointers in const generics behindben-4/+60
const_compare_raw_pointers.
2019-10-09Pretty print function pointer const values.ben-4/+4
2019-10-09Fix calling function pointer const parameters. Also fixes inference ofben-0/+99
function pointer const parameters.
2019-10-07Add a regression test for issue 62187varkor-0/+32
2019-10-07Move const generic regression tests to their old foldervarkor-0/+0
2019-10-07Test diagnostic output of type mismatches for types that have constben-0/+48
generics arguments.
2019-10-06Fix const arguments not displaying in types mismatch diagnostic.ben-6/+6
2019-10-03typo: fix typo in E0392Ben Boeckel-1/+1
See #64931.
2019-10-03Rollup merge of #64931 - estebank:missing-param-ref, r=matthewjasper,CentrilMazdak Farrokhzad-1/+1
Reword E0392 slightly Make it clearer that a type or lifetime argument not being used can be fixed by referencing it in a struct's fields, not just using `PhathomData`. CC #53589.
2019-10-02review commentEsteban Küber-1/+1
2019-09-30Reword E0392 slightlyEsteban Küber-1/+1
Make it clearer that a type or lifetime argument not being used can be fixed by referencing it in a struct's fields, not just using `PhathomData`.
2019-09-29Add a couple more test cases, including non-ascii strings.ben-3/+16
2019-09-28Added test for mismatched slices, and byte slices.ben-1/+47
2019-09-28Add support for relating slices in `super_relate_consts`.ben-0/+20
2019-09-23Rollup merge of #64679 - skinny121:const-infer, r=varkorMazdak Farrokhzad-0/+29
Infer consts more consistently Moved some duplicated logic in `TypeRelation` methods into `super_combined_consts`. Before some `TypeRelation`s like `Lub` wasn't using `replace_if_possible`, meaning some inference types were staying around longer than they should be. Fixes https://github.com/rust-lang/rust/issues/64519 r? @varkor
2019-09-22Infer consts consistently. Moved some logic into super_combined_consts,ben-0/+29
also removed some duplicated logic from TypeRelation methods.
2019-09-19When possible point at argument causing item obligation failureEsteban Küber-2/+2
2019-09-12Auto merge of #64360 - varkor:foreign-items-diagnostic-const-generics, ↵bors-0/+37
r=cramertj Correct the polymorphic extern fn error for const parameters Before, any polymorphism on extern functions was assumed to be type polymorphism.
2019-09-11Make wording less confusingvarkor-2/+2
2019-09-10Correct the polymorphic extern fn error for const parametersvarkor-0/+37
2019-09-09Auto merge of #64237 - estebank:tweak-method-not-found, r=Centrilbors-1/+1
Give method not found a primary span label
2019-09-08Give method not found a primary span labelEsteban Küber-1/+1
2019-09-08Update test stderr with results of enabling unused lintsMark Rousskov-5/+7
2019-08-19test: add test for #61432.Eduard-Mihai Burtescu-0/+25
2019-08-05Add implementations for converting boxed slices into boxed arraysJake Goulding-0/+101
This mirrors the implementations of reference slices into arrays.
2019-07-30--bless tests due to INCOMPLETE_FEATURES being a lint.Mazdak Farrokhzad-31/+90
2019-07-28Add tests for Vec(Deque) array PartialEq impls.Mazdak Farrokhzad-0/+131
2019-07-18Auto merge of #61749 - davidtwco:rfc-2203-const-array-repeat-exprs, r=eddybbors-16/+22
rustc/rustc_mir: Implement RFC 2203. This PR implements RFC 2203, allowing constants in array repeat expressions. Part of #49147. r? @eddyb
2019-07-09normalize use of backticks in compiler messages for libsyntax/feature_gateSamy Kacimi-3/+3
https://github.com/rust-lang/rust/issues/60532
2019-07-07rustc/rustc_mir: Implement RFC 2203.David Wood-16/+22
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.
2019-07-07Use const generics for array impls, restricted to 0..=32Scott McMurray-8/+158
- uses a never-stable core::array::LengthAtMost32 to bound the impls - includes a custom error message to avoid mentioning LengthAtMost32 too often - doesn't use macros for the slice implementations to avoid #62433
2019-07-04Permit use of mem::uninitialized via allow(deprecated)Mark Rousskov-0/+1
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-2/+2
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