Skip to content

Update sign formatting for numeric types in docs #38704

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 1 commit 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
11 changes: 6 additions & 5 deletions src/libcollections/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,10 @@
//! These can all be interpreted as flags for a particular formatter.
//!
//! * `+` - This is intended for numeric types and indicates that the sign
//! should always be printed. Positive signs are never printed by
//! default, and the negative sign is only printed by default for the
//! `Signed` trait. This flag indicates that the correct sign (`+` or `-`)
//! should always be printed.
//! * `-` - Currently not used
//! (`+` or `-`) should always be printed. Positive signs are never
//! printed by default. This behavior is controlled by the
//! [`pad_integral`][pad_integral] method.
//! * `-` - Currently not used.
//! * `#` - This flag is indicates that the "alternate" form of printing should
//! be used. The alternate forms are:
//! * `#?` - pretty-print the `Debug` formatting
Expand All @@ -384,6 +383,8 @@
//! same format would yield `-0000001` for the integer `-1`. Notice that
//! the negative version has one fewer zero than the positive version.
//!
//! [pad_integral]: struct.Formatter.html#method.pad_integral
//!
//! ## Width
//!
//! This is a parameter for the "minimum width" that the format should take up.
Expand Down