about summary refs log tree commit diff
path: root/src/test/ui/rfc-2005-default-binding-mode
AgeCommit message (Collapse)AuthorLines
2019-04-22Never stop due to errors before borrow checkingEsteban Küber-2/+18
2019-04-22update tests for migrate mode by defaultMatthew Jasper-76/+23
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-4/+0
2019-03-23Tweak spans for E0599Esteban Küber-3/+1
2019-03-11Update NLL testsVadim Petrochenkov-7/+7
2019-03-11Update testsVadim Petrochenkov-11/+11
2019-03-02Point at enum definition when match patterns are not exhaustiveEsteban Küber-0/+2
``` error[E0004]: non-exhaustive patterns: type `X` is non-empty --> file.rs:9:11 | 1 | / enum X { 2 | | A, | | - variant not covered 3 | | B, | | - variant not covered 4 | | C, | | - variant not covered 5 | | } | |_- `X` defined here ... 9 | match x { | ^ | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `B` and `C` not covered --> file.rs:11:11 | 1 | / enum X { 2 | | A, 3 | | B, 4 | | C, | | - not covered 5 | | } | |_- `X` defined here ... 11 | match x { | ^ patterns `C` not covered ``` When a match expression doesn't have patterns covering every variant, point at the enum's definition span. On a best effort basis, point at the variant(s) that are missing. This does not handle the case when the missing pattern is due to a field's enum variants: ``` enum E1 { A, B, C, } enum E2 { A(E1), B, } fn foo() { match E2::A(E1::A) { E2::A(E1::B) => {} E2::B => {} } //~^ ERROR `E2::A(E1::A)` and `E2::A(E1::C)` not handled } ``` Unify look between match with no arms and match with some missing patterns. Fix #37518.
2019-02-20Fix erroneous loop diagnostic in nllSantiago Pastorino-1/+1
This commit fixes the logic of detecting when a use happen in a later iteration of where a borrow was defined Fixes #53773
2018-12-26Fixed more tests.Alexander Regueiro-2/+4
2018-12-25Remove licensesMark Rousskov-111/+21
2018-10-03Clearer later use messages for callsMatthew Jasper-1/+1
Give a special message when the later use is from a call. Use the span of the callee instead of the whole expression. For conflicting borrow messages say that the later use is of the first borrow.
2018-09-28Test fixes for the change of error message for issue #54015Rusty Blitzerr-1/+1
2018-08-01Errors are more specific in cases where borrows are used in future ↵David Wood-1/+1
iterations of loops.
2018-07-12Factor out suggest_ref_mut; use it in rustc_borrowckashtneoi-12/+0
Also teach rustc_borrowck not to show useless help messages like "use a mutable reference instead: `x`".
2018-07-12span_suggestioncsmoe-6/+6
2018-07-12Don't try to suggest `ref mut` for implicit `ref`ashtneoi-6/+6
2018-06-19NLL: Updates to diagnostic output in `test/ui`.Felix S. Klock II-24/+12
2018-04-18Update the previously checkpointed (but unused by bors) tests to reflect ↵Felix S. Klock II-12/+24
current reality.
2018-04-11Checkpoint the current status of NLL on `ui` tests via compare-mode=nll.Felix S. Klock II-0/+56
2018-04-05make mem-categorization use adjusted type for patternsNiko Matsakis-0/+47
Fixes #49631
2018-03-28Stabilize match_default_bindingsTaylor Cramer-51/+12
This includes a submodule update to rustfmt in order to allow a stable feature declaration.
2018-03-20Stabilize slice patterns without `..`Vadim Petrochenkov-1/+1
Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)`
2018-03-14update testsGuillaume Gomez-9/+9
2018-02-26Update UI testsVadim Petrochenkov-20/+20
2018-02-25Update ui testsGuillaume Gomez-0/+9
2018-01-15Add error code for unstable feature errorsGuillaume Gomez-1/+1
2017-11-24Use `get_parent_node` instead of using spansEsteban Küber-1/+1
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-24/+26
2017-11-15Point to ADT definition when not finding variant, method, assoc typeEsteban Küber-1/+1
2017-10-30typeck: suggest use of match_default_bindings featureTamir Duberstein-0/+25
Fixes #45383. Updates #42640.
2017-10-06implement pattern-binding-modes RFCTobias Schottdorf-0/+338
See the [RFC] and [tracking issue]. [tracking issue]: https://github.com/rust-lang/rust/issues/42640 [RFC]: https://github.com/rust-lang/rfcs/blob/491e0af/text/2005-match-ergonomics.md