about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCarol (Nichols || Goulding) <carol.nichols@gmail.com>2015-09-28 22:23:16 -0400
committerCarol (Nichols || Goulding) <carol.nichols@gmail.com>2015-09-28 22:56:22 -0400
commita33d61a4016e484aedb65b3545925d30fc9f2e36 (patch)
tree13af5df1972433d7fda8114c14833d88aba92ca6 /src
parent6108e8c3e5e5768d9862ba0f66f44cbca098d015 (diff)
downloadrust-a33d61a4016e484aedb65b3545925d30fc9f2e36.tar.gz
rust-a33d61a4016e484aedb65b3545925d30fc9f2e36.zip
Use code formatting for code-relevant values in std::fmt docs
Especially when documenting the use of `0`, since zero looks very
similar to `O` in fonts not meant for displaying code.

Other literal characters, traits, etc should also use code formatting.
This change makes this documentation more internally consistent.
Diffstat (limited to 'src')
-rw-r--r--src/libcollections/fmt.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs
index d17bd5cccf5..a31ad6c1093 100644
--- a/src/libcollections/fmt.rs
+++ b/src/libcollections/fmt.rs
@@ -218,7 +218,7 @@
 //! }
 //! ```
 //!
-//! ### fmt::Display vs fmt::Debug
+//! ### `fmt::Display` vs `fmt::Debug`
 //!
 //! These two formatting traits have distinct purposes:
 //!
@@ -358,24 +358,24 @@
 //! to ensure padding is applied is to format your input, then use this
 //! resulting string to pad your output.
 //!
-//! ## Sign/#/0
+//! ## Sign/`#`/`0`
 //!
 //! These can all be interpreted as flags for a particular formatter.
 //!
-//! * '+' - This is intended for numeric types and indicates that the sign
+//! * `+` - 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 -)
+//!         `Signed` trait. This flag indicates that the correct sign (`+` or `-`)
 //!         should always be printed.
-//! * '-' - Currently not used
-//! * '#' - This flag is indicates that the "alternate" form of printing should
+//! * `-` - 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
-//!     * `#x` - precedes the argument with a "0x"
-//!     * `#X` - precedes the argument with a "0x"
-//!     * `#b` - precedes the argument with a "0b"
-//!     * `#o` - precedes the argument with a "0o"
-//! * '0' - This is used to indicate for integer formats that the padding should
+//!     * `#x` - precedes the argument with a `0x`
+//!     * `#X` - precedes the argument with a `0x`
+//!     * `#b` - precedes the argument with a `0b`
+//!     * `#o` - precedes the argument with a `0o`
+//! * `0` - This is used to indicate for integer formats that the padding should
 //!         both be done with a `0` character as well as be sign-aware. A format
 //!         like `{:08}` would yield `00000001` for the integer `1`, while the
 //!         same format would yield `-0000001` for the integer `-1`. Notice that
@@ -390,8 +390,8 @@
 //!
 //! The default fill/alignment for non-numerics is a space and left-aligned. The
 //! defaults for numeric formatters is also a space but with right-alignment. If
-//! the '0' flag is specified for numerics, then the implicit fill character is
-//! '0'.
+//! the `0` flag is specified for numerics, then the implicit fill character is
+//! `0`.
 //!
 //! The value for the width can also be provided as a `usize` in the list of
 //! parameters by using the `2$` syntax indicating that the second argument is a