| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2023-12-12 | Rollup merge of #117914 - estebank:issue-85843, r=wesleywiser | Matthias Krüger | -5/+40 | |
| On borrow return type, suggest borrowing from arg or owned return type When we encounter a function with a return type that has an anonymous lifetime with no argument to borrow from, besides suggesting the `'static` lifetime we now also suggest changing the arguments to be borrows or changing the return type to be an owned type. ``` error[E0106]: missing lifetime specifier --> $DIR/variadic-ffi-6.rs:7:6 | LL | ) -> &usize { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | LL | ) -> &'static usize { | +++++++ help: instead, you are more likely to want to change one of the arguments to be borrowed... | LL | x: &usize, | + help: ...or alternatively, to want to return an owned value | LL - ) -> &usize { LL + ) -> usize { | ``` Fix #85843. | ||||
| 2023-12-07 | recurse into refs when comparing tys for diagnostics | jyn | -4/+4 | |
| 2023-12-05 | Add print_trait_sugared | Michael Goulet | -14/+14 | |
| 2023-11-30 | generic_const_exprs: suggest to add the feature, not use it | Ralf Jung | -1/+1 | |
| 2023-11-24 | Show number in error message even for one error | Nilstrieb | -47/+47 | |
| Co-authored-by: Adrian <adrian.iosdev@gmail.com> | ||||
| 2023-11-20 | Fix incorrect lifetime suggestion | Esteban Küber | -19/+2 | |
| 2023-11-20 | Tweak wording | Esteban Küber | -5/+5 | |
| 2023-11-20 | On borrow return type, suggest borrowing from arg or owned return type | Esteban Küber | -7/+59 | |
| When we encounter a function with a return type that has an anonymous lifetime with no argument to borrow from, besides suggesting the `'static` lifetime we now also suggest changing the arguments to be borrows or changing the return type to be an owned type. ``` error[E0106]: missing lifetime specifier --> $DIR/variadic-ffi-6.rs:7:6 | LL | ) -> &usize { | ^ expected named lifetime parameter | = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` | LL | ) -> &'static usize { | +++++++ help: instead, you are more likely to want to change one of the arguments to be borrowed... | LL | x: &usize, | + help: ...or alternatively, to want to return an owned value | LL - ) -> &usize { LL + ) -> usize { | ``` Fix #85843. | ||||
| 2023-11-02 | Pretty print Fn traits in rustc_on_unimplemented | Michael Goulet | -12/+12 | |
| 2023-10-26 | Quietly fail if an error has already occurred | Oli Scherer | -0/+70 | |
| 2023-10-24 | Rollup merge of #116841 - chenyukang:yukang-suggest-unwrap-expect, r=b-naber | Matthias Krüger | -0/+4 | |
| Suggest unwrap/expect for let binding type mismatch Found it when investigating https://github.com/rust-lang/rust/issues/116738 I'm not sure whether it's a good style to suggest `unwrap`, seems it's may helpful for newcomers. #116738 needs another fix to improve it. | ||||
| 2023-10-25 | suggest unwrap/expect for let binding type mismatch | yukang | -0/+4 | |
| 2023-10-21 | Rollup merge of #116990 - estebank:issue-68445, r=cjgillot | Matthias Krüger | -0/+4 | |
| Mention `into_iter` on borrow errors suggestions when appropriate If we encounter a borrow error on `vec![1, 2, 3].iter()`, suggest `into_iter`. Fix #68445. | ||||
| 2023-10-20 | s/generator/coroutine/ | Oli Scherer | -1/+1 | |
| 2023-10-20 | Mention `into_iter` on borrow errors suggestions when appropriate | Esteban Küber | -0/+4 | |
| If we encounter a borrow error on `vec![1, 2, 3].iter()`, suggest `into_iter`. Fix #68445. | ||||
| 2023-10-08 | remove trailing dots | Ali MJ Al-Nasrawy | -8/+8 | |
| 2023-10-08 | always show and explain sub region | Ali MJ Al-Nasrawy | -18/+26 | |
| 2023-10-08 | improve the suggestion of generic_bound_failure | Ali MJ Al-Nasrawy | -10/+12 | |
| 2023-10-05 | Add a note to duplicate diagnostics | Alex Macleod | -0/+1 | |
| 2023-09-28 | make adt_const_params feature suggestion more consistent with others and ↵ | asquared31415 | -2/+2 | |
| only suggest it when the type can probably work | ||||
| 2023-09-14 | Properly consider binder vars in HasTypeFlagsVisitor | Michael Goulet | -0/+27 | |
| 2023-09-11 | Rollup merge of #115743 - compiler-errors:no-impls, r=davidtwco | Matthias Krüger | -0/+6 | |
| Point out if a local trait has no implementations Slightly helps with #115741 | ||||
| 2023-09-10 | Point out if a local trait has no implementations | Michael Goulet | -0/+6 | |
| 2023-09-08 | Improve "associated type not found" diagnostics | Lieselotte | -1/+1 | |
| 2023-08-08 | fix: not insert missing lifetime for `ConstParamTy` | bohan | -5/+0 | |
| 2023-07-28 | Account for macros when suggesting a new let binding | Esteban Küber | -1/+5 | |
| 2023-07-10 | Do not set up wrong span for adjustments | Michael Goulet | -23/+23 | |
| 2023-05-21 | Tweak the post-order for multi-successor blocks | Scott McMurray | -1/+1 | |
| 2023-05-05 | improve diagnostics and bless tests | Boxy | -12/+11 | |
| 2023-04-29 | Do not force anonymous lifetimes in consts to be static. | Camille GILLOT | -0/+20 | |
| 2023-04-21 | Auto merge of #110370 - c410-f3r:dqewdas, r=petrochenkov | bors | -0/+13 | |
| Move test files r? `@petrochenkov` | ||||
| 2023-04-20 | Move test files | Caio | -0/+13 | |
| 2023-04-19 | Extend and use `hir::Node::body_id` | Maybe Waffle | -0/+2 | |
| 2023-04-14 | use param instead of ty | Alex Chi | -70/+46 | |
| Signed-off-by: Alex Chi <iskyzh@gmail.com> | ||||
| 2023-04-14 | better suggestion based on hir | Alex Chi | -1/+148 | |
| Signed-off-by: Alex Chi <iskyzh@gmail.com> | ||||
| 2023-04-14 | suggest lifetime for closure parameter type when mismatch | Alex Chi | -0/+8 | |
| 2023-04-05 | Add regression test for #93911 | Yuki Okushi | -0/+18 | |
| Signed-off-by: Yuki Okushi <jtitor@2k36.org> | ||||
| 2023-03-17 | Do not ICE for unexpected lifetime with ConstGeneric rib | yukang | -2/+24 | |
| 2023-03-10 | feat: implement better error for manual impl of `Fn*` traits | Ezra Shaw | -0/+6 | |
| 2023-03-03 | Label opaque type for 'captures lifetime' error message | Michael Goulet | -3/+10 | |
| 2023-02-26 | Don't trigger ICE for ReError when the other region is empty. | Lenko Donchev | -0/+40 | |
| 2023-02-22 | diagnostics: update test cases to refer to assoc fn with `self` as method | Michael Howell | -4/+4 | |
| 2023-02-10 | Auto merge of #107652 - estebank:re_error, r=oli-obk | bors | -4/+74 | |
| Introduce `ReError` CC #69314 r? `@nagisa` | ||||
| 2023-02-09 | Rollup merge of #107648 - matthiaskrgr:unused_lifetime_104432_fix, r=cjgillot | Dylan DPC | -0/+12 | |
| unused-lifetimes: don't warn about lifetimes originating from expanded code previously, we would warn like this: ```` warning: lifetime parameter `'s` never used --> /tmp/unusedlif/code.rs:6:62 | 5 | #[derive(Clone)] | - help: elide the unused lifetime 6 | struct ShimMethod4<T: Trait2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::As)); | ^^ | = note: requested on the command line with `-W unused-lifetimes` ```` Fixes #104432 | ||||
| 2023-02-09 | Introduce `ReError` | Esteban Küber | -4/+74 | |
| CC #69314 | ||||
| 2023-02-04 | Recover from default value for a lifetime in generic parameters. | Lenko Donchev | -0/+14 | |
| 2023-02-03 | unused-lifetimes: don't warn about lifetimes originating from expanded code | Matthias Krüger | -0/+12 | |
| previously, we would warn like this: ```` warning: lifetime parameter `'s` never used --> /tmp/unusedlif/code.rs:6:62 | 5 | #[derive(Clone)] | - help: elide the unused lifetime 6 | struct ShimMethod4<T: Trait2 + 'static>(pub &'static dyn for<'s> Fn(&'s mut T::As)); | ^^ | = note: requested on the command line with `-W unused-lifetimes` ```` Fixes #104432 | ||||
| 2023-01-30 | Modify primary span label for E0308 | Esteban Küber | -3/+3 | |
| The previous output was unintuitive to users. | ||||
| 2023-01-25 | Rollup merge of #106897 - estebank:issue-99430, r=davidtwco | Matthias Krüger | -0/+2 | |
| Tweak E0597 CC #99430 | ||||
| 2023-01-23 | Add hint for missing lifetime bound on trait object when type alias is used | yanchen4791 | -0/+105 | |
