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.
This commit is contained in:
kennytm
2018-04-04 11:07:28 +02:00
committed by GitHub
2 changed files with 7 additions and 8 deletions

View File

@@ -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);
/// ```