improve clunky grammar in borrowck diagnostic

This commit is contained in:
Yotam Ofek 2025-01-11 13:20:17 +00:00
parent 86d2129a78
commit 6680bc5554
2 changed files with 3 additions and 3 deletions

View File

@ -2695,7 +2695,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
}
err.multipart_suggestion_verbose(
"try explicitly pass `&Self` into the Closure as an argument",
"try explicitly passing `&Self` into the closure as an argument",
sugg,
Applicability::MachineApplicable,
);

View File

@ -11,7 +11,7 @@ LL | self.qux();
LL | x(1);
| - immutable borrow later used here
|
help: try explicitly pass `&Self` into the Closure as an argument
help: try explicitly passing `&Self` into the closure as an argument
|
LL ~ let x = |this: &Self, v: i32| {
LL ~ this.bar();
@ -35,7 +35,7 @@ LL | self.qux();
LL | y();
| - immutable borrow later used here
|
help: try explicitly pass `&Self` into the Closure as an argument
help: try explicitly passing `&Self` into the closure as an argument
|
LL ~ let y = |this: &Self| {
LL ~ this.bar();