about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-05-19 18:38:53 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-05-19 18:38:53 -0400
commit6fc93b85bcc3d8a038e4c523ad56cbe54d40ebcc (patch)
tree4cd95ca67708794ea3a04a8bab88c4f8f8bed4f3
parent1bcfe5e5ad61e23475dd980288516db6e994bcdc (diff)
parent733e7eea5c459c67173e369c1deac3bcde8f03ef (diff)
downloadrust-6fc93b85bcc3d8a038e4c523ad56cbe54d40ebcc.tar.gz
rust-6fc93b85bcc3d8a038e4c523ad56cbe54d40ebcc.zip
Rollup merge of #25602 - parkr:patch-1, r=alexcrichton
Padding and alignment are often not implemented by types and can cause confusion in the user.  Per discussion with @alexcrichton, here is my PR.

/cc https://github.com/rust-lang/time/issues/98
-rw-r--r--src/libcollections/fmt.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcollections/fmt.rs b/src/libcollections/fmt.rs
index 80fa6d397c8..cb023bcb7a5 100644
--- a/src/libcollections/fmt.rs
+++ b/src/libcollections/fmt.rs
@@ -353,6 +353,10 @@
 //! * `^` - the argument is center-aligned in `width` columns
 //! * `>` - the argument is right-aligned in `width` columns
 //!
+//! Note that alignment may not be implemented by some types. A good way
+//! to ensure padding is applied is to format your input, then use this
+//! resulting string to pad your output.
+//!
 //! ## Sign/#/0
 //!
 //! These can all be interpreted as flags for a particular formatter.