summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-04-04 11:07:28 +0200
committerGitHub <noreply@github.com>2018-04-04 11:07:28 +0200
commit4b6ab5a115b41717fc88c0060aa1fc44f82b0085 (patch)
tree652165bb7e0b87b94777875190c797f5514eb999 /src/libstd
parentce5db0f887d489f62c90002d9d154e5e3a4a4cbd (diff)
parent333b0a0471c2593e46c8f13124ee28178f5c9643 (diff)
downloadrust-4b6ab5a115b41717fc88c0060aa1fc44f82b0085.tar.gz
rust-4b6ab5a115b41717fc88c0060aa1fc44f82b0085.zip
Rollup merge of #49619 - durka:patch-46, r=steveklabnik
tweak core::fmt docs

Remove an outdated (pre-1.0!) claim about passing something or other to a function. Also swap the variable names in the example.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/macros.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs
index 47609f17221..5ef7c159655 100644
--- a/src/libstd/macros.rs
+++ b/src/libstd/macros.rs
@@ -341,8 +341,8 @@ pub mod builtin {
     /// format string in `format_args!`.
     ///
     /// ```rust
-    /// let display = format!("{:?}", format_args!("{} foo {:?}", 1, 2));
-    /// let debug = format!("{}", format_args!("{} foo {:?}", 1, 2));
+    /// let debug = format!("{:?}", format_args!("{} foo {:?}", 1, 2));
+    /// let display = format!("{}", format_args!("{} foo {:?}", 1, 2));
     /// assert_eq!("1 foo 2", display);
     /// assert_eq!(display, debug);
     /// ```