| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2020-05-30 | Tweak type parameter errors to reduce verbosity | Esteban Küber | -39/+7 | |
| 2020-05-27 | review comments: change wording and visual output | Esteban Küber | -1/+1 | |
| 2020-05-27 | Modify wording | Esteban Küber | -2/+2 | |
| 2020-05-27 | review comments | Esteban Küber | -1/+1 | |
| 2020-05-27 | Tweak output for mismatched impl item | Esteban Küber | -2/+2 | |
| Detect type parameter that might require lifetime constraint. Do not name `ReVar`s in expected/found output. Reword text suggesting to check the lifetimes. | ||||
| 2020-05-27 | Name `RegionKind::ReVar` lifetimes in diagnostics | Esteban Küber | -1/+3 | |
| 2020-05-07 | Add test for #34979 | Yuki Okushi | -0/+23 | |
| 2020-04-22 | Tweak wording | Esteban Küber | -4/+4 | |
| 2020-04-22 | Tweak `'static` suggestion code | Esteban Küber | -4/+20 | |
| Fix #71196. | ||||
| 2020-04-16 | outlives: ignore lifetimes shallowly found in `ty::FnDef`s. | Eduard-Mihai Burtescu | -0/+13 | |
| 2020-03-12 | update tests | Mark Mansi | -5/+5 | |
| 2020-02-22 | update some tests | Mark Mansi | -5/+5 | |
| 2020-02-19 | Tweak binding lifetime suggestion text | Esteban Küber | -5/+5 | |
| We already have a structured suggestion, but the wording made it seem like that wasn't the case. Fix #65286. r? @varkor | ||||
| 2020-02-06 | rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. | Eduard-Mihai Burtescu | -1/+1 | |
| 2020-02-06 | rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace. | Eduard-Mihai Burtescu | -1/+1 | |
| 2020-02-05 | Account for `fn()` types in lifetime suggestions | Esteban Küber | -18/+6 | |
| 2020-02-05 | review comments | Esteban Küber | -3/+3 | |
| 2020-02-05 | Suggest `'r` instead of `'lifetime` | Esteban Küber | -6/+6 | |
| 2020-02-05 | When suggesting lifetimes, propose adding the new lifetime to all arguments | Esteban Küber | -6/+6 | |
| 2020-02-05 | Use spans for input borrowed types unrelated to return type | Esteban Küber | -3/+15 | |
| 2020-02-02 | Use more accurate failed predicate spans | Esteban Küber | -20/+22 | |
| 2020-02-02 | Point at arguments or output when fn obligations come from them, or ident ↵ | Esteban Küber | -46/+28 | |
| when they don't | ||||
| 2020-01-19 | review comments | Esteban Küber | -3/+3 | |
| 2020-01-19 | When encountering an expected named lifetime and none are present, suggest ↵ | Esteban Küber | -3/+15 | |
| adding one | ||||
| 2020-01-16 | review comments | Esteban Küber | -1/+1 | |
| 2020-01-16 | When trait bounds are missing for return values, point at them | Esteban Küber | -0/+3 | |
| 2019-12-28 | Do not ICE on lifetime error involving closures | Esteban Küber | -0/+18 | |
| 2019-11-21 | Auto merge of #66389 - estebank:type-err-labels, r=petrochenkov | bors | -4/+4 | |
| Specific labels when referring to "expected" and "found" types | ||||
| 2019-11-18 | Auto merge of #58281 - mark-i-m:synthesis, r=estebank | bors | -0/+16 | |
| 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 | Specific labels when referring to "expected" and "found" types | Esteban Küber | -4/+4 | |
| 2019-11-07 | Update ui tests | Guillaume Gomez | -0/+25 | |
| 2019-10-29 | Point at the trait item and tweak wording | Esteban Küber | -2/+5 | |
| 2019-10-29 | review comments | Esteban Küber | -2/+2 | |
| 2019-10-29 | Custom lifetime error for `impl` item doesn't conform to `trait` | Esteban Küber | -0/+23 | |
| 2019-10-27 | update tests | Mark Mansi | -0/+16 | |
| 2019-10-11 | Print lifetimes with backticks | Yuki Okushi | -2/+2 | |
| 2019-09-12 | update tests | Mark Mansi | -3/+3 | |
| 2019-08-19 | distinguish object-lifetime-default elision from other elision | Niko Matsakis | -6/+6 | |
| Object-lifetime-default elision is distinct from other forms of elision; it always refers to some enclosing lifetime *present in the surrounding type* (e.g., `&dyn Bar` expands to `&'a (dyn Bar + 'a)`. If there is no enclosing lifetime, then it expands to `'static`. Therefore, in an `impl Trait<Item = dyn Bar>` setting, we don't expand to create a lifetime parameter for the `dyn Bar + 'X` bound. It will just be resolved to `'static`. Annoyingly, the responsibility for this resolution is spread across multiple bits of code right now (`middle::resolve_lifetimes`, `lowering`). The lowering code knows that the default is for an object lifetime, but it doesn't know what the correct result would be. Probably this should be fixed, but what we do now is a surgical fix: we have it generate a different result for elided lifetimes in a object context, and then we can ignore those results when figuring out the lifetimes that are captured in the opaque type. | ||||
| 2019-06-13 | Create fewer basic blocks in match MIR lowering | Matthew Jasper | -3/+3 | |
| 2019-05-29 | Update ui test suite to use dyn | memoryruins | -24/+24 | |
| 2019-05-12 | Change compare mode to use -Zborrowck=mir | Matthew Jasper | -0/+399 | |
| 2019-05-03 | Update tests | Christopher Vittal | -52/+14 | |
| 2019-04-25 | Rollup merge of #60160 - xldenis:fix-overlapping-zero-width-annotation, ↵ | Mazdak Farrokhzad | -3/+1 | |
| r=estebank Fix #58270, fix off-by-one error in error diagnostics. This fixes #58270 by checking if two diagnostics overlap completely when we're calculating the line offset for each message. | ||||
| 2019-04-22 | Fix #58270, fix off-by-one error in error diagnostics. | Xavier Denis | -3/+1 | |
| 2019-04-22 | Remove double trailing newlines | varkor | -3/+0 | |
| 2019-04-22 | update tests for migrate mode by default | Matthew Jasper | -26/+9 | |
| 2019-04-18 | hide `--explain` hint if error has no extended info | Andy Russell | -26/+1 | |
| 2019-03-11 | Update NLL tests | Vadim Petrochenkov | -1/+1 | |
| 2019-03-11 | Update tests | Vadim Petrochenkov | -64/+64 | |
| 2018-12-25 | Remove licenses | Mark Rousskov | -496/+75 | |
