about summary refs log tree commit diff
path: root/src/test/ui/or-patterns
AgeCommit message (Collapse)AuthorLines
2020-04-19Fix ICE for broken or-pattern in async fnMatthew Jasper-0/+51
2020-03-27Rollup merge of #70457 - Centril:non-exhaustive-scrutinee-type, r=estebankMazdak Farrokhzad-0/+5
non-exhastive diagnostic: add note re. scrutinee type This fixes https://github.com/rust-lang/rust/issues/67259 by adding a note: ``` = note: the matched value is of type &[i32] ``` to non-exhaustive pattern matching errors. r? @varkor @estebank
2020-03-27non-exhastive diagnostic: add note re. scrutinee typeMazdak Farrokhzad-0/+5
2020-03-26Add tests based on issue #70372 commentsAmin Arria-0/+22
2020-03-10Matrix::push: recursively expand or-patternsMazdak Farrokhzad-0/+43
2020-03-08Rollup merge of #69599 - Centril:typeck-tweak-wording, r=davidtwcoMazdak Farrokhzad-8/+8
check_binding_alt_eq_ty: improve precision wrt. `if let` Follow up to https://github.com/rust-lang/rust/pull/69452 -- this tweaks the `check_binding_alt_eq_ty` logic wrt. wording so that `if let` doesn't include "in this arm" (because there can only ever be one arm). r? @estebank
2020-03-07Rollup merge of #69687 - Centril:bm-inconsistent-wording, r=estebankMazdak Farrokhzad-20/+20
resolve, inconsistent binding mode: tweak wording Now that we can have e.g. `let Ok(x) | Err(x) = res;`, it's no longer appropriate to refer to "the same *match arm*", so let's tweak the wording. r? @estebank
2020-03-04fix tidy errorMatthew Kuo-1/+2
2020-03-04test(pattern): harden tests for or-patterns with slice-patternsMatthew Kuo-2/+12
Some of the nested OR paths were being missed
2020-03-04test(pattern): add tests for combinations of pattern featuresMatthew Kuo-0/+79
Reference issue #67311 Tests combinations of the following pattern features: - bindings_after_at - or_patterns - slice_patterns - box_patterns
2020-03-04resolve, inconsistent binding mode: tweak wording.Mazdak Farrokhzad-20/+20
2020-03-01check_binding_alt_eq_ty: improve precision wrt. `if let`.Mazdak Farrokhzad-8/+8
2020-02-25improve or-pattern type consistency diagnosticsMazdak Farrokhzad-51/+131
2020-02-15Rollup merge of #68856 - Centril:or-pat-ref-pat, r=matthewjasperYuki Okushi-13/+383
typeck: clarify def_bm adjustments & add tests for or-patterns Clarify the adjustment algorithm for the expected type / default binding-modes when type checking patterns with more documentation and tweaks that make the algorithm more independent of the pattern forms. Also resolve the FIXME noted for or-patterns by deciding that the current implementation is correct, noting the rationale and adding tests for the current implementation. cc https://github.com/rust-lang/rust/issues/54883 r? @oli-obk @varkor
2020-02-09--bless --compare-mode=nllMatthias Prechtl-27/+27
2020-02-05or_patterns: test default binding modesMazdak Farrokhzad-0/+132
2020-02-05or_patterns: rename previous testMazdak Farrokhzad-22/+22
2020-02-05or_patterns: harden bindings testMazdak Farrokhzad-7/+245
2020-02-05or_patterns: add regression test for 68785Mazdak Farrokhzad-0/+14
2020-02-03Apply suggestions from code reviewmatthewjasper-3/+0
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2020-02-03Add more tests for or-patternsMatthew Jasper-0/+193
2020-02-01Basic run-pass tests for or-patternsDan Robertson-0/+151
Add some basic run-pass ui tests for or-patterns.
2020-02-01Update existing tests for or-patternsMatthew Jasper-99/+68
2020-02-01Remove or_patterns from INCOMPLETE_FEATURESMatthew Jasper-194/+119
2020-01-24Normalise notes with the/isvarkor-1/+1
2020-01-18slice_patterns: remove gates in testsMazdak Farrokhzad-3/+3
2019-12-30Blame user type in pat type error.Mazdak Farrokhzad-1/+1
2019-12-30refactor and fix this-expression-has-type noteMazdak Farrokhzad-4/+10
2019-12-25Feature gate or patterns in const contextsMatthew Jasper-0/+93
2019-12-12Update testsLeSeulArtichaut-1/+1
2019-12-12Update UI test expectationsLeSeulArtichaut-1/+1
2019-12-02Move recently changed tests to the correct fileNadrieril-66/+60
2019-12-02Lint for redundant branches in or-patternsNadrieril-6/+47
2019-12-02Add some testsNadrieril-9/+37
2019-11-30Rollup merge of #66612 - Nadrieril:or-patterns-initial, r=varkorMazdak Farrokhzad-0/+238
Initial implementation of or-pattern usefulness checking The title says it all. I'd like to request a perf run on that, hopefully this doesn't kill performance too much. cc https://github.com/rust-lang/rust/issues/54883
2019-11-30Apply suggestions from code reviewNadrieril Feneanar-1/+1
Co-Authored-By: varkor <github@varkor.com>
2019-11-26Move tests to ui, split them and add someNadrieril-0/+238
2019-11-21Point at type in `let` assignment on type errorsEsteban Küber-5/+8
2019-11-18Surround types with backticks in type errorsEsteban Küber-3/+3
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-12/+0
2019-11-18review comments: tweak prefix stringsEsteban Küber-2/+2
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-2/+2
2019-11-10Make error and warning annotations mandatory in UI testsTomasz Miąsko-1/+1
This change makes error and warning annotations mandatory in UI tests. The only exception are tests that use error patterns to match compiler output and don't have any annotations.
2019-10-31Revert "pre-expansion gate box_patterns"Eduard-Mihai Burtescu-1/+0
This reverts commit 2aff6b36d7ed5c25700669a92b4a43200ee0fe6b.
2019-10-24pre-expansion gate box_patternsMazdak Farrokhzad-0/+1
2019-09-29syntax: recover trailing `|` in or-patterns.Mazdak Farrokhzad-11/+244
2019-09-05resolve: test consistent or-patterns being allowed.Mazdak Farrokhzad-38/+132
2019-09-05resolve: test binding mode consistency for or-patterns.Mazdak Farrokhzad-0/+98
2019-09-05resolve: add test for missing bindings in or-patterns.Mazdak Farrokhzad-0/+324
2019-09-05resolve: account for general or-patterns in consistency checking.Mazdak Farrokhzad-4/+11