Skip to content

Commit bb39c49

Browse files
committed
Auto merge of #33643 - eddyb:rollup, r=eddyb
Rollup of 27 pull requests - Successful merges: #33342, #33393, #33415, #33475, #33517, #33533, #33534, #33565, #33580, #33584, #33585, #33588, #33590, #33591, #33593, #33598, #33600, #33602, #33603, #33604, #33605, #33607, #33612, #33620, #33633, #33634, #33635 - Failed merges: #33578
2 parents 5ebe418 + ffbfbe4 commit bb39c49

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
/*-*-*/
5858
/Makefile
5959
/build
60+
/config.toml
6061
/dist/
6162
/dl/
6263
/doc

src/doc/footer.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<footer><p>
22
Copyright &copy; 2011-2015 The Rust Project Developers. Licensed under the
33
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
4-
or the <a href="http://opensource.org/licenses/MIT">MIT license</a>, at your option.
4+
or the <a href="https://opensource.org/licenses/MIT">MIT license</a>, at your option.
55
</p><p>
66
This file may not be copied, modified, or distributed except according to those terms.
77
</p></footer>

src/libcollections/fmt.rs

+7-9
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
//!
8282
//! ```
8383
//! format!("{argument}", argument = "test"); // => "test"
84-
//! format!("{name} {}", 1, name = 2); // => "2 1"
84+
//! format!("{name} {}", 1, name = 2); // => "2 1"
8585
//! format!("{a} {c} {b}", a="a", b='b', c=3); // => "a 3 b"
8686
//! ```
8787
//!
@@ -104,8 +104,8 @@
104104
//! octal.
105105
//!
106106
//! There are various parameters which do require a particular type, however.
107-
//! Namely, the `{:.*}` syntax, which sets the number of numbers after the
108-
//! decimal in floating-point types:
107+
//! An example is the `{:.*}` syntax, which sets the number of decimal places
108+
//! in floating-point types:
109109
//!
110110
//! ```
111111
//! let formatted_number = format!("{:.*}", 2, 1.234567);
@@ -292,15 +292,13 @@
292292
//! use std::fmt;
293293
//! use std::io::{self, Write};
294294
//!
295-
//! fmt::format(format_args!("this returns {}", "String"));
296-
//!
297295
//! let mut some_writer = io::stdout();
298296
//! write!(&mut some_writer, "{}", format_args!("print with a {}", "macro"));
299297
//!
300298
//! fn my_fmt_fn(args: fmt::Arguments) {
301299
//! write!(&mut io::stdout(), "{}", args);
302300
//! }
303-
//! my_fmt_fn(format_args!("or a {} too", "function"));
301+
//! my_fmt_fn(format_args!(", or a {} too", "function"));
304302
//! ```
305303
//!
306304
//! The result of the `format_args!` macro is a value of type `fmt::Arguments`.
@@ -316,7 +314,7 @@
316314
//! # Syntax
317315
//!
318316
//! The syntax for the formatting language used is drawn from other languages,
319-
//! so it should not be too alien. Arguments are formatted with python-like
317+
//! so it should not be too alien. Arguments are formatted with Python-like
320318
//! syntax, meaning that arguments are surrounded by `{}` instead of the C-like
321319
//! `%`. The actual grammar for the formatting syntax is:
322320
//!
@@ -527,15 +525,15 @@ use string;
527525
/// use std::fmt;
528526
///
529527
/// let s = fmt::format(format_args!("Hello, {}!", "world"));
530-
/// assert_eq!(s, "Hello, world!".to_string());
528+
/// assert_eq!(s, "Hello, world!");
531529
/// ```
532530
///
533531
/// Please note that using [`format!`][format!] might be preferrable.
534532
/// Example:
535533
///
536534
/// ```
537535
/// let s = format!("Hello, {}!", "world");
538-
/// assert_eq!(s, "Hello, world!".to_string());
536+
/// assert_eq!(s, "Hello, world!");
539537
/// ```
540538
///
541539
/// [format!]: ../macro.format!.html

0 commit comments

Comments
 (0)