summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authornovalis <novalis@novalis.org>2013-09-03 00:38:46 -0400
committernovalis <novalis@novalis.org>2013-09-03 23:39:58 -0400
commit5977376b4615f5efe590ee7775c48d82211c68ab (patch)
tree4b8e67dab810940e7ce2cef95f25759241e903e1 /src/libstd
parent3c4e943881fc93136c4b6ad80f23aead9fee9d1b (diff)
downloadrust-5977376b4615f5efe590ee7775c48d82211c68ab.tar.gz
rust-5977376b4615f5efe590ee7775c48d82211c68ab.zip
Test and document escaping on format!()
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fmt/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs
index da5abe95787..8d50f5efa48 100644
--- a/src/libstd/fmt/mod.rs
+++ b/src/libstd/fmt/mod.rs
@@ -308,6 +308,13 @@ For integral types, this has no meaning currently.
 For floating-point types, this indicates how many digits after the decimal point
 should be printed.
 
+## Escaping
+
+The literal characters `{`, `}`, or `#` may be included in a string by
+preceding them with the `\` character. Since `\` is already an
+escape character in Rust strings, a string literal using this escape
+will look like `"\\{"`.
+
 */
 
 use prelude::*;