| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2023-01-11 | Move /src/test to /tests | Albert Larsan | -302/+0 | |
| 2022-12-13 | Suggest `ref` for some patterns as a fallback | Esteban Küber | -0/+5 | |
| 2022-07-01 | Shorten def_span for more items. | Camille GILLOT | -1/+1 | |
| 2022-05-06 | Resolve vars in note_type_err | Jack Huey | -4/+4 | |
| 2022-03-08 | Change wording of suggestion to add missing `match` arm | Esteban Kuber | -1/+1 | |
| 2022-03-08 | When finding a match expr with a single arm that requires more, suggest it | Esteban Kuber | -1/+5 | |
| Given ```rust match Some(42) { Some(0) => {} } ``` suggest ```rust match Some(42) { Some(0) => {} None | Some(_) => todo!(), } ``` | ||||
| 2022-03-08 | When encountering a match expr with no arms, suggest it | Esteban Kuber | -1/+1 | |
| Given ```rust match Some(42) {} ``` suggest ```rust match Some(42) { None | Some(_) => todo!(), } ``` | ||||
| 2021-09-25 | Use larger span for adjustments on method calls | Aaron Hill | -15/+1 | |
| Currently, we use a relatively 'small' span for THIR expressions generated by an 'adjustment' (e.g. an autoderef, autoborrow, unsizing). As a result, if a borrow generated by an adustment ends up causing a borrowcheck error, for example: ```rust let mut my_var = String::new(); let my_ref = &my_var my_var.push('a'); my_ref; ``` then the span for the mutable borrow may end up referring to only the base expression (e.g. `my_var`), rather than the method call which triggered the mutable borrow (e.g. `my_var.push('a')`) Due to a quirk of the MIR borrowck implementation, this doesn't always get exposed in migration mode, but it does in many cases. This commit makes THIR building consistently use 'larger' spans for adjustment expressions The intent of this change it make it clearer to users when it's the specific way in which a variable is used (for example, in a method call) that produdes a borrowcheck error. For example, an error message claiming that a 'mutable borrow occurs here' might be confusing if it just points at a usage of a variable (e.g. `my_var`), when no `&mut` is in sight. Pointing at the entire expression should help to emphasize that the method call itself is responsible for the mutable borrow. In several cases, this makes the `#![feature(nll)]` diagnostic output match up exactly with the default (migration mode) output. As a result, several `.nll.stderr` files end up getting removed entirely. | ||||
| 2021-07-02 | Improve error reporting for modifications behind `&` references | Fabian Wolff | -12/+12 | |
| 2020-09-15 | Stabilize move_ref_pattern | Amjad Alsharafi | -3/+1 | |
| 2020-03-27 | non-exhastive diagnostic: add note re. scrutinee type | Mazdak Farrokhzad | -0/+1 | |
| 2020-03-07 | Rollup merge of #69687 - Centril:bm-inconsistent-wording, r=estebank | Mazdak Farrokhzad | -2/+2 | |
| 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-06 | When encountering an Item in a pat context, point at the item def | Esteban Küber | -1/+8 | |
| 2020-03-04 | resolve, inconsistent binding mode: tweak wording. | Mazdak Farrokhzad | -2/+2 | |
| 2020-02-25 | check_pat_path: use pattern_cause | Mazdak Farrokhzad | -0/+2 | |
| 2020-02-25 | enhance check_pat_lit with TopInfo | Mazdak Farrokhzad | -0/+4 | |
| 2020-02-02 | move_ref_patterns: introduce tests | Mazdak Farrokhzad | -15/+7 | |
| bindings_after_at: harden tests | ||||
| 2020-01-18 | slice_patterns: remove gates in tests | Mazdak Farrokhzad | -3/+1 | |
| 2019-12-23 | check_legality_of_move_bindings: generalize diagnostics & add comments | Mazdak Farrokhzad | -1/+1 | |
| 2019-11-21 | Auto merge of #66389 - estebank:type-err-labels, r=petrochenkov | bors | -10/+7 | |
| Specific labels when referring to "expected" and "found" types | ||||
| 2019-11-18 | Surround types with backticks in type errors | Esteban Küber | -3/+3 | |
| 2019-11-18 | Remove E0308 note when primary label has all info | Esteban Küber | -4/+1 | |
| 2019-11-18 | Specific labels when referring to "expected" and "found" types | Esteban Küber | -5/+5 | |
| 2019-11-18 | Update ui tests | Guillaume Gomez | -0/+2 | |
| 2019-07-28 | Use new 'p @ ..' syntax in tests. | Mazdak Farrokhzad | -1/+1 | |
| 2019-06-03 | Update tests for changes to cannot move errors | Matthew Jasper | -9/+4 | |
| 2019-05-12 | Change compare mode to use -Zborrowck=mir | Matthew Jasper | -0/+14 | |
| 2019-04-22 | Never stop due to errors before borrow checking | Esteban Küber | -2/+18 | |
| 2019-04-22 | update tests for migrate mode by default | Matthew Jasper | -76/+23 | |
| 2019-04-18 | hide `--explain` hint if error has no extended info | Andy Russell | -4/+0 | |
| 2019-03-23 | Tweak spans for E0599 | Esteban Küber | -3/+1 | |
| 2019-03-11 | Update NLL tests | Vadim Petrochenkov | -7/+7 | |
| 2019-03-11 | Update tests | Vadim Petrochenkov | -11/+11 | |
| 2019-03-02 | Point at enum definition when match patterns are not exhaustive | Esteban 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-20 | Fix erroneous loop diagnostic in nll | Santiago 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-26 | Fixed more tests. | Alexander Regueiro | -2/+4 | |
| 2018-12-25 | Remove licenses | Mark Rousskov | -111/+21 | |
| 2018-10-03 | Clearer later use messages for calls | Matthew 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-28 | Test fixes for the change of error message for issue #54015 | Rusty Blitzerr | -1/+1 | |
| 2018-08-01 | Errors are more specific in cases where borrows are used in future ↵ | David Wood | -1/+1 | |
| iterations of loops. | ||||
| 2018-07-12 | Factor out suggest_ref_mut; use it in rustc_borrowck | ashtneoi | -12/+0 | |
| Also teach rustc_borrowck not to show useless help messages like "use a mutable reference instead: `x`". | ||||
| 2018-07-12 | span_suggestion | csmoe | -6/+6 | |
| 2018-07-12 | Don't try to suggest `ref mut` for implicit `ref` | ashtneoi | -6/+6 | |
| 2018-06-19 | NLL: Updates to diagnostic output in `test/ui`. | Felix S. Klock II | -24/+12 | |
| 2018-04-18 | Update the previously checkpointed (but unused by bors) tests to reflect ↵ | Felix S. Klock II | -12/+24 | |
| current reality. | ||||
| 2018-04-11 | Checkpoint the current status of NLL on `ui` tests via compare-mode=nll. | Felix S. Klock II | -0/+56 | |
| 2018-04-05 | make mem-categorization use adjusted type for patterns | Niko Matsakis | -0/+47 | |
| Fixes #49631 | ||||
| 2018-03-28 | Stabilize match_default_bindings | Taylor Cramer | -51/+12 | |
| This includes a submodule update to rustfmt in order to allow a stable feature declaration. | ||||
| 2018-03-20 | Stabilize slice patterns without `..` | Vadim Petrochenkov | -1/+1 | |
| Merge `feature(advanced_slice_patterns)` into `feature(slice_patterns)` | ||||
| 2018-03-14 | update tests | Guillaume Gomez | -9/+9 | |
