Skip to content

Commit 6680bc5

Browse files
committed
improve clunky grammar in borrowck diagnostic
1 parent 86d2129 commit 6680bc5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2695,7 +2695,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
26952695
}
26962696

26972697
err.multipart_suggestion_verbose(
2698-
"try explicitly pass `&Self` into the Closure as an argument",
2698+
"try explicitly passing `&Self` into the closure as an argument",
26992699
sugg,
27002700
Applicability::MachineApplicable,
27012701
);

tests/ui/suggestions/issue-105761-suggest-self-for-closure.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | self.qux();
1111
LL | x(1);
1212
| - immutable borrow later used here
1313
|
14-
help: try explicitly pass `&Self` into the Closure as an argument
14+
help: try explicitly passing `&Self` into the closure as an argument
1515
|
1616
LL ~ let x = |this: &Self, v: i32| {
1717
LL ~ this.bar();
@@ -35,7 +35,7 @@ LL | self.qux();
3535
LL | y();
3636
| - immutable borrow later used here
3737
|
38-
help: try explicitly pass `&Self` into the Closure as an argument
38+
help: try explicitly passing `&Self` into the closure as an argument
3939
|
4040
LL ~ let y = |this: &Self| {
4141
LL ~ this.bar();

0 commit comments

Comments
 (0)