summary refs log tree commit diff
path: root/src/test/ui/pattern
AgeCommit message (Collapse)AuthorLines
2020-07-05Address code reviewsYuki Okushi-10/+21
2020-07-05Explain exhaustive matching on {usize,isize} maximum valuesYuki Okushi-0/+46
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-31/+31
propagation
2020-06-24Provide suggestions for some moved value errorsEsteban Küber-0/+24
When encountering an used moved value where the previous move happened in a `match` or `if let` pattern, suggest using `ref`. Fix #63988. When encountering a `&mut` value that is used in multiple iterations of a loop, suggest reborrowing it with `&mut *`. Fix #62112.
2020-06-13Prefer the associated consts for pattern matching errorLzu Tao-25/+25
2020-05-29Rollup merge of #72572 - JohnTitor:add-tests, r=matthewjasperDylan DPC-0/+17
Add some regression tests Closes #68532 Closes #70121 Closes #71042 CC #56445 r? @matthewjasper since they (except for #71042) are related to #72362.
2020-05-27Add test for #71042Yuki Okushi-0/+17
2020-05-23Remove out-of-date commentNadrieril-1/+0
2020-05-23Work around type normalization issuesNadrieril-0/+23
2020-05-17We don't use tyerr anymoreNadrieril-0/+22
This however unearthed a bug, hence the FIXME and the workaround.
2020-04-11rustc: Add a warning count upon completionRoccoDev-1/+6
2020-04-02tests: remove ignore directives from tests that mention core/alloc/std spans.Eduard-Mihai Burtescu-27/+12
2020-03-27non-exhastive diagnostic: add note re. scrutinee typeMazdak Farrokhzad-0/+108
2020-03-25borrowck: prefer "value" over "`_`".Mazdak Farrokhzad-41/+41
2020-03-23Ignore tests on some platforms due to #53081Aaron Hill-12/+27
2020-03-22Store idents for `DefPathData` into crate metadataAaron Hill-0/+18
Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for #68686, since throwing away a `Span` means that we lose hygiene information.
2020-03-17Update tests for erasing regions in typeckMatthew Jasper-2/+2
2020-03-04test(pattern): harden tests for or-patterns with slice-patternsMatthew Kuo-2/+15
Some of the nested OR paths were being missed
2020-03-04test(pattern): add tests for combinations of pattern featuresMatthew Kuo-0/+204
Reference issue #67311 Tests combinations of the following pattern features: - bindings_after_at - or_patterns - slice_patterns - box_patterns
2020-02-25check_pat_tuple: use pattern_causeMazdak Farrokhzad-0/+7
2020-02-25check_pat_path: use pattern_causeMazdak Farrokhzad-0/+2
2020-02-21Fix error messageLeSeulArtichaut-33/+33
Bless tests
2020-02-17Do not emit note suggesting to implement trait to foreign typeLeSeulArtichaut-2/+0
Update tests Extend to other operations Refractor check in a separate function Fix more tests
2020-02-11Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPCbors-5/+5
Make issue references consistent Fixes https://github.com/rust-lang/rust/issues/62976 cc https://github.com/rust-lang/rust/pull/63008 r? @varkor because you reviewed the original pr
2020-02-09--bless --compare-mode=nllMatthias Prechtl-5/+5
2020-02-09Don't parse `mut a @ b` as `mut a @ mut b`Matthew Jasper-0/+75
2020-02-09Auto merge of #68376 - Centril:move-ref-patterns, r=matthewjasperbors-636/+2686
Initial implementation of `#![feature(move_ref_pattern)]` Following up on #45600, under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary. Closes #45600. Tracking issue: #68354. r? @matthewjasper
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-0/+1
2020-02-02move_ref_pattern: test captures inside closureMazdak Farrokhzad-0/+526
2020-02-02move_ref_pattern: change pov in diagnostics & add binding namesMazdak Farrokhzad-457/+457
2020-02-02move_ref_pattern: don't ICE on unreachable 2xby-move conflictsMazdak Farrokhzad-0/+15
2020-02-02move_ref_patterns: introduce testsMazdak Farrokhzad-401/+1910
bindings_after_at: harden tests
2020-02-01Remove or_patterns from INCOMPLETE_FEATURESMatthew Jasper-19/+10
2020-01-24Normalise notes with the/isvarkor-18/+18
2020-01-20check_match: simplify check_armMazdak Farrokhzad-1/+3
2020-01-20check_match: unify some lowering code and fix some ICEsMazdak Farrokhzad-0/+77
2020-01-18slice_patterns: organize some testsMazdak Farrokhzad-1/+1
2020-01-18slice_patterns: remove gates in testsMazdak Farrokhzad-194/+172
2020-01-12Diagnostics should not end with a full stopvarkor-1/+1
2020-01-12Split `rustc_mir::{build, hair, lints}` into their own crateMatthew Jasper-1/+1
2020-01-09Update testsVadim Petrochenkov-16/+63
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-0/+2
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-02Reformulate test descriptionLeSeulArtichaut-1/+1
Co-authored-by: Centril <twingoow@gmail.com>
2020-01-02Enhance testLeSeulArtichaut-14/+35
Co-authored-by: Centril <twingoow@gmail.com>
2020-01-02Move testLeSeulArtichaut-0/+57
Co-authored-by: Centril <twingoow@gmail.com>
2019-12-30Blame user type in pat type error.Mazdak Farrokhzad-0/+84
2019-12-30refactor and fix this-expression-has-type noteMazdak Farrokhzad-2/+2
2019-12-30Show scrutinee expr type for struct fields.Mazdak Farrokhzad-0/+23
TODO: The type is wrong and will be fixed in later commits.
2019-12-30MatchExpressionArmPattern: Use more generic wording.Mazdak Farrokhzad-2/+2
The existing wording was inappropriate for e.g. `if let Ok(_) = expr { .. }`. The diagnostic would leak the fact that we desugar to a `match`.
2019-12-24Rollup merge of #67543 - JohnTitor:regression-tests, r=CentrilMazdak Farrokhzad-0/+22
Add regression tests for fixed ICEs Closes #61747 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01)) Closes #66205 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01)) Closes #66270 (fixed by #66246) Closes #67424 (fixed by #67160) Also picking a minor nit up from #67071 with 101dd7bad9432730fa2f625ae43afcc2929457d4 r? @Centril