Commit 82422c8
authored
Rollup merge of rust-lang#107306 - compiler-errors:correct-sugg-for-closure-arg-needs-borrow, r=oli-obk
Correct suggestions for closure arguments that need a borrow
Fixes rust-lang#107301 by dealing with binders correctly
Fixes another issue where we were suggesting adding just `&` when we expected `&mut _` in a closure argFile tree
3 files changed
+74
-10
lines changed- compiler/rustc_trait_selection/src/traits/error_reporting
- tests/ui/suggestions
3 files changed
+74
-10
lines changedLines changed: 20 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3759 | 3759 | | |
3760 | 3760 | | |
3761 | 3761 | | |
3762 | | - | |
| 3762 | + | |
3763 | 3763 | | |
3764 | 3764 | | |
3765 | 3765 | | |
3766 | 3766 | | |
3767 | 3767 | | |
3768 | | - | |
| 3768 | + | |
3769 | 3769 | | |
3770 | 3770 | | |
3771 | 3771 | | |
| |||
3776 | 3776 | | |
3777 | 3777 | | |
3778 | 3778 | | |
3779 | | - | |
3780 | | - | |
| 3779 | + | |
| 3780 | + | |
3781 | 3781 | | |
3782 | | - | |
| 3782 | + | |
3783 | 3783 | | |
3784 | | - | |
| 3784 | + | |
3785 | 3785 | | |
3786 | 3786 | | |
3787 | 3787 | | |
| |||
3795 | 3795 | | |
3796 | 3796 | | |
3797 | 3797 | | |
3798 | | - | |
3799 | | - | |
3800 | | - | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
| 3808 | + | |
| 3809 | + | |
| 3810 | + | |
3801 | 3811 | | |
3802 | | - | |
| 3812 | + | |
3803 | 3813 | | |
3804 | 3814 | | |
3805 | 3815 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments