| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-09-30 | References to ZSTs may be at arbitrary aligned addresses | Oliver Scherer | -0/+9 | |
| 2020-09-26 | `char` not char | varkor | -6/+6 | |
| 2020-09-23 | Deduplicate errors in const to pat conversion | Oliver Scherer | -8/+1 | |
| 2020-09-20 | Use precise errors during const to pat conversion instead of a catch-all on ↵ | Oliver Scherer | -3/+10 | |
| the main constant | ||||
| 2020-09-20 | Implement destructuring for all aggregates and for references | Oliver Scherer | -0/+46 | |
| 2020-08-18 | Provide better spans for the match arm without tail expression | Wonwoo Choi | -0/+116 | |
| 2020-07-08 | Correctly mark the ending span of a match arm | Ayaz Hafiz | -0/+28 | |
| Closes #74050 r? @matthewjasper | ||||
| 2020-06-02 | normalize adt fields during structural match check | Bastian Kauschke | -0/+23 | |
| 2020-05-08 | Skip tests on emscripten | Yuki Okushi | -0/+5 | |
| 2020-05-06 | Move tests from `test/run-fail` to UI | Yuki Okushi | -0/+77 | |
| 2020-04-29 | emit err when using trait objects in pat | Bastian Kauschke | -0/+18 | |
| 2020-03-27 | non-exhastive diagnostic: add note re. scrutinee type | Mazdak Farrokhzad | -0/+1 | |
| 2020-03-12 | update tests | Mark Mansi | -2/+2 | |
| 2020-03-06 | When encountering an Item in a pat context, point at the item def | Esteban Küber | -0/+3 | |
| 2020-02-25 | check_pat_path: use pattern_cause | Mazdak Farrokhzad | -1/+3 | |
| 2020-02-25 | enhance check_pat_lit with TopInfo | Mazdak Farrokhzad | -0/+3 | |
| 2020-02-06 | rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. | Eduard-Mihai Burtescu | -2/+0 | |
| 2020-02-06 | rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace. | Eduard-Mihai Burtescu | -1/+1 | |
| 2020-01-24 | Normalise notes with the/is | varkor | -1/+1 | |
| 2020-01-18 | slice_patterns: organize some tests | Mazdak Farrokhzad | -72/+0 | |
| 2020-01-18 | slice_patterns: remove gates in tests | Mazdak Farrokhzad | -7/+5 | |
| 2020-01-09 | Update tests | Vadim Petrochenkov | -3/+24 | |
| 2020-01-05 | Add backticks to various diagnostics | varkor | -8/+8 | |
| 2019-12-30 | MatchExpressionArmPattern: 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-30 | note other end-point when typeck range pats | Mazdak Farrokhzad | -1/+3 | |
| 2019-11-21 | Auto merge of #66389 - estebank:type-err-labels, r=petrochenkov | bors | -50/+19 | |
| Specific labels when referring to "expected" and "found" types | ||||
| 2019-11-18 | Auto merge of #58281 - mark-i-m:synthesis, r=estebank | bors | -0/+4 | |
| Add outlives suggestions for some lifetime errors This PR implements suggestion diagnostics for some lifetime mismatch errors. When the borrow checker finds that some lifetime 'a doesn't outlive some other lifetime 'b that it should outlive, then in addition to the current lifetime error, we also emit a suggestion for how to fix the problem by adding a bound: - If a and b are normal named regions, suggest to add the bound `'a: 'b` - If b is static, suggest to replace a with static - If b also needs to outlive a, they must be the same, so suggest unifying them We start with a simpler implementation that avoids diagnostic regression or implementation complexity: - We only makes suggestions for lifetimes the user can already name (eg not closure regions or elided regions) - For now, we only emit a help note, not an actually suggestion because it is significantly easier. Finally, there is one hack: it seems that implicit regions in async fn are given the name '_ incorrectly. To avoid suggesting '_: 'x, we simply filter out such lifetimes by name. For more info, see this internals thread: https://internals.rust-lang.org/t/mechanical-suggestions-for-some-borrow-checker-errors/9049/3 TL;DR Make suggestions to add a `where 'a: 'b` constraint for some lifetime errors. Details are in the paper linked from the internals thread above. r? @estebank TODO - [x] Clean up code - [x] Only make idiomatic suggestions - [x] don't suggest naming `&'a self` - [x] rather than `'a: 'static`, suggest replacing `'a` with `'static` - [x] rather than `'a: 'b, 'b: 'a`, suggest replacing `'a` with `'b` or vice versa - [x] Performance (maybe need a perf run when this is closer to the finish line?) - perf run was clean... - EDIT: perf run seems to only check non-error performance... How do we check that error performance didn't regress? - [x] Needs ui tests - [x] Integrate the `help` message into the main lifetime `error` | ||||
| 2019-11-18 | Surround types with backticks in type errors | Esteban Küber | -11/+11 | |
| 2019-11-18 | Remove E0308 note when primary label has all info | Esteban Küber | -36/+5 | |
| 2019-11-18 | review comments: tweak prefix strings | Esteban Küber | -2/+2 | |
| 2019-11-18 | Specific labels when referring to "expected" and "found" types | Esteban Küber | -14/+14 | |
| 2019-11-13 | Tweak non-char/numeric in range pattern diagnostic | Yuki Okushi | -14/+23 | |
| 2019-10-28 | Improve the "try using a variant of the expected type" hint. | Patryk Wychowaniec | -2/+2 | |
| 2019-10-28 | Auto merge of #65421 - estebank:variants, r=petrochenkov | bors | -8/+8 | |
| Point at local similarly named element and tweak references to variants Partially address #65386. | ||||
| 2019-10-27 | Gather together usefulness tests | Nadrieril | -928/+0 | |
| I took most tests that were testing only for match exhaustiveness, pattern refutability or match arm reachability, and put them in the same test folder. | ||||
| 2019-10-27 | Point at local similarly named element and tweak references to variants | Esteban Küber | -8/+8 | |
| Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method. | ||||
| 2019-10-27 | update tests | Mark Mansi | -0/+4 | |
| 2019-10-16 | Only emit overlapping patterns lint if the overlap is partial | Esteban Küber | -51/+9 | |
| 2019-10-16 | Continue to emit unreachable pattern on cases caught by overlapping patterns | Esteban Küber | -19/+51 | |
| 2019-10-16 | Move overlapping patterns to its own lint | Esteban Küber | -4/+10 | |
| 2019-10-16 | Add check for overlapping ranges to unreachable patterns lint | Esteban Küber | -27/+37 | |
| 2019-10-14 | Rollup merge of #65292 - JohnTitor:add-backticks, r=varkor,Centril | Mazdak Farrokhzad | -4/+4 | |
| Print lifetimes with backticks Fixes #65287 r? @varkor | ||||
| 2019-10-11 | Print lifetimes with backticks | Yuki Okushi | -4/+4 | |
| 2019-10-09 | Suggest `if let` on `let` refutable binding | Esteban Küber | -0/+28 | |
| 2019-09-21 | Do not trigger unreachable lint in async body and Use span labels | Esteban Küber | -6/+3 | |
| 2019-09-18 | Point at original span when emitting unreachable lint | Aaron Hill | -0/+5 | |
| Fixes #64590 When we emit an 'unreachable' lint, we now add a note pointing at the expression that actually causes the code to be unreachable (e.g. `return`, `break`, `panic`). This is especially useful when macros are involved, since a diverging expression might be hidden inside of a macro invocation. | ||||
| 2019-09-11 | Auto merge of #64271 - Centril:non-exhaustive-peel-refs, r=estebank | bors | -0/+242 | |
| check_match: refactor + improve non-exhaustive diagnostics for default binding modes Refactor `check_match` a bit with more code-reuse and improve the diagnostics for a non-exhaustive pattern match by peeling off any references from the scrutinee type so that the "defined here" label is added in more cases. For example: ```rust error[E0004]: non-exhaustive patterns: `&mut &B` not covered --> foo.rs:4:11 | 1 | enum E { A, B } | --------------- | | | | | not covered | `E` defined here ... 4 | match x { | ^ pattern `&mut &B` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms ``` Moreover, wrt. "defined here", we give irrefutable pattern matching (i.e. in `let`, `for`, and `fn` parameters) a more consistent treatment in line with `match`. r? @estebank | ||||
| 2019-09-09 | check_match: unify check_irrefutable & check_exhaustive more. | Mazdak Farrokhzad | -17/+43 | |
| 2019-09-09 | check_match: refactor + improve non-exhaustive diag for default binding modes. | Mazdak Farrokhzad | -0/+216 | |
| 2019-09-08 | Update tests wrt. bind_by_by_move_pattern_guards stabilization. | Mazdak Farrokhzad | -2/+0 | |
