Skip to content

Commit

Permalink
Rollup merge of rust-lang#118429 - cuviper:its-arguments, r=compiler-…
Browse files Browse the repository at this point in the history
…errors

Fix a typo in a `format_args!` note
  • Loading branch information
matthiaskrgr authored Nov 29, 2023
2 parents 9c93eff + b8cdd43 commit 0687dcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
Applicability::MaybeIncorrect,
);
} else {
err.note("the result of `format_args!` can only be assigned directly if no placeholders in it's arguments are used");
err.note("the result of `format_args!` can only be assigned directly if no placeholders in its arguments are used");
err.note("to learn more, visit <https://doc.rust-lang.org/std/macro.format_args.html>");
}
suggested = true;
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/borrowck/issue-114374-invalid-help-fmt-args.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LL | let x = format_args!("a {} {} {}.", 1, format_args!("b{}!", 2), 3);
LL | bar(x);
| - borrow later used here
|
= note: the result of `format_args!` can only be assigned directly if no placeholders in it's arguments are used
= note: the result of `format_args!` can only be assigned directly if no placeholders in its arguments are used
= note: to learn more, visit <https://doc.rust-lang.org/std/macro.format_args.html>
= note: this error originates in the macro `format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand All @@ -24,7 +24,7 @@ LL |
LL | bar(foo);
| --- borrow later used here
|
= note: the result of `format_args!` can only be assigned directly if no placeholders in it's arguments are used
= note: the result of `format_args!` can only be assigned directly if no placeholders in its arguments are used
= note: to learn more, visit <https://doc.rust-lang.org/std/macro.format_args.html>
= note: this error originates in the macro `format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand Down

0 comments on commit 0687dcb

Please sign in to comment.