about summary refs log tree commit diff
path: root/src/test/ui/const-generics
AgeCommit message (Collapse)AuthorLines
2020-10-23const_eval_checked: deal with unused nodes + divBastian Kauschke-0/+62
2020-10-22improve const infer errorBastian Kauschke-1/+1
2020-10-22min_const_generics: allow ty param in repeat exprBastian Kauschke-20/+122
2020-10-17Suggest minimal subset features in `incomplete_features` lintYuki Okushi-0/+10
2020-10-12Bless expected errorsEthan Brierley-132/+132
2020-10-11`min_const_generics` diagnostics improvementsEthan Brierley-174/+174
2 3
2020-10-05Rollup merge of #77439 - varkor:min_const_generics-tests, r=lcnr,estebankDylan DPC-62/+623
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-04Rollup merge of #77388 - JohnTitor:add-tests, r=Dylan-DPCYuki Okushi-0/+11
Add some regression tests Closes #66501 Closes #68951 Closes #72565 Closes #74244 Closes #75299 The first issue is fixed in 1.43.0, other issues are fixed in the recent nightly.
2020-10-03Add `const_generics` test for `impl-trait-with-const-arguments`varkor-2/+14
2020-10-03Move testsvarkor-148/+0
2020-10-03Add tests for `const_generics`varkor-21/+392
2020-10-03Replace "non trivial" with "non-trivial"varkor-82/+82
2020-10-02resolve: prohibit anon const non-static lifetimesDavid Wood-0/+48
This commit modifies name resolution to emit an error when non-static lifetimes are used in anonymous constants when the `min_const_generics` feature is enabled. Signed-off-by: David Wood <david@davidtw.co>
2020-10-02Add various `min_const_generics` regression testsvarkor-0/+296
2020-10-02Fix missing diagnostic span for `impl Trait` with const genericsvarkor-0/+30
2020-10-01Add a regression test for issue-75299Yuki Okushi-0/+11
2020-10-01Rollup merge of #77303 - lcnr:const-evaluatable-TooGeneric, r=oli-obk,varkorDylan DPC-41/+49
const evaluatable: improve `TooGeneric` handling Instead of emitting an error in `fulfill`, we now correctly stall on inference variables. As `const_eval_resolve` returns `ErrorHandled::TooGeneric` when encountering generic parameters on which we actually do want to error, we check for inference variables and eagerly emit an error if they don't exist, returning `ErrorHandled::Reported` instead. Also contains a small bugfix for `ConstEquate` where we previously only stalled on type variables. This is probably a leftover from when we did not yet support stalling on const inference variables. r? @oli-obk cc @varkor @eddyb
2020-09-30Rollup merge of #77331 - hameerabbasi:issue-74906, r=lcnrJonas Schievink-0/+25
Add test for async/await combined with const-generics. Fixes #74906.
2020-09-29Auto merge of #76754 - varkor:diagnostic-cleanup-ii, r=ecstatic-morsebors-2/+2
Clean up diagnostics for arithmetic operation errors Plus a small tweak to a range pattern error message.
2020-09-29Add test for async/await combined with const-generics.Hameer Abbasi-0/+25
2020-09-28const evaluatable: improve `TooGeneric` handlingBastian Kauschke-41/+49
2020-09-26Fix UI test falloutvarkor-1/+1
2020-09-26Make invalid integer operation messages consistentvarkor-1/+1
2020-09-26Rollup merge of #77093 - lcnr:const-generics-infer-warning, r=varkorRalf Jung-18/+31
merge `need_type_info_err(_const)` I hoped that this would automatically solve #76737 but it doesn't quite seem like it fixes #77092 r? @varkor
2020-09-25Move from {{closure}}#0 syntax to {closure#0} for (def) path componentsmarmeladema-2/+2
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-3/+5
2020-09-24visit impl self ty + traitBastian Kauschke-0/+25
2020-09-24assign the correct `DefId` in `nominal_obligations`Bastian Kauschke-3/+3
2020-09-24walk hir to get const evaluatable predicatesBastian Kauschke-14/+12
2020-09-24const_evaluatable_checked: collect predicates from fn_sigBastian Kauschke-1/+54
2020-09-23Rollup merge of #76939 - lcnr:const-evaluatable-cont, r=oli-obkDylan DPC-10/+32
emit errors during AbstractConst building There changes are currently still untested, so I don't expect this to pass CI :laughing: It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this. r? @oli-obk
2020-09-23use the correct span when dealing with inference variablesBastian Kauschke-6/+31
2020-09-23merge `need_type_info_err(_const)`Bastian Kauschke-18/+6
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-21reviewBastian Kauschke-18/+9
2020-09-21add test for closures in abstract constsBastian Kauschke-0/+21
2020-09-21bless testsBastian Kauschke-10/+20
2020-09-21add testsBastian Kauschke-0/+205
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-18support const_evaluatable_checked across crate boundariesBastian Kauschke-0/+73
2020-09-18add test for let-bindingsBastian Kauschke-0/+33
2020-09-18add function callsBastian Kauschke-0/+30
2020-09-18allow unary operations and ignore StorageLive/Dead stmtsBastian Kauschke-0/+14
2020-09-18use abstract consts when unifying ConstKind::UnevaluatedBastian Kauschke-8/+15
2020-09-18initial working stateBastian Kauschke-0/+14
2020-09-16Rollup merge of #76719 - hameerabbasi:min-const-generics-ty, r=lcnrTyler Mandry-5/+59
Change error message for ty param in const This PR introduces the following changes: * 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. Fixes #76701