Skip to content

Fix a typo in fmt.rs #15174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/libstd/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ format!("{a:s} {c:d} {b:?}", a="a", b=(), c=3i); // => "a 3 ()"
```

It is illegal to put positional parameters (those without names) after arguments
which have names. Like positional parameters, it is illegal to provided named
parameters that are unused by the format string.
which have names. Like with positional parameters, it is illegal to provide
named parameters that are unused by the format string.

### Argument types

Expand Down Expand Up @@ -185,7 +185,7 @@ struct. In order to help with this, the `Formatter` struct also provides some
helper methods.

Additionally, the return value of this function is `fmt::Result` which is a
typedef to `Result<(), IoError>` (also known as `IoError<()>`). Formatting
typedef to `Result<(), IoError>` (also known as `IoResult<()>`). Formatting
implementations should ensure that they return errors from `write!` correctly
(propagating errors upward).

Expand Down