diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-27 10:47:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-27 10:47:54 +0200 |
| commit | b4bc2b0cf8a889bf0c1e4fdd826122ec5b4a6479 (patch) | |
| tree | 86e376fcedef5c39f886434785a20799ba713797 /src/liballoc | |
| parent | 2d05bde0b73dfe9d02f2c4282a6834097d547ee7 (diff) | |
| parent | 554dd3e350721a7064932719ec925d1a1b5eb552 (diff) | |
| download | rust-b4bc2b0cf8a889bf0c1e4fdd826122ec5b4a6479.tar.gz rust-b4bc2b0cf8a889bf0c1e4fdd826122ec5b4a6479.zip | |
Rollup merge of #49401 - alercah:format, r=cramertj
Add missing '?' to format grammar.
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/fmt.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/liballoc/fmt.rs b/src/liballoc/fmt.rs index 90043e1c716..b2c4582e840 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -326,7 +326,7 @@ //! sign := '+' | '-' //! width := count //! precision := count | '*' -//! type := identifier | '' +//! type := identifier | '?' | '' //! count := parameter | integer //! parameter := argument '$' //! ``` @@ -516,17 +516,17 @@ pub use core::fmt::rt; #[stable(feature = "rust1", since = "1.0.0")] pub use core::fmt::{Formatter, Result, Write}; #[stable(feature = "rust1", since = "1.0.0")] -pub use core::fmt::{Octal, Binary}; +pub use core::fmt::{Binary, Octal}; #[stable(feature = "rust1", since = "1.0.0")] -pub use core::fmt::{Display, Debug}; +pub use core::fmt::{Debug, Display}; #[stable(feature = "rust1", since = "1.0.0")] -pub use core::fmt::{LowerHex, UpperHex, Pointer}; +pub use core::fmt::{LowerHex, Pointer, UpperHex}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::fmt::{LowerExp, UpperExp}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::fmt::Error; #[stable(feature = "rust1", since = "1.0.0")] -pub use core::fmt::{ArgumentV1, Arguments, write}; +pub use core::fmt::{write, ArgumentV1, Arguments}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::fmt::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple}; @@ -563,7 +563,8 @@ use string; pub fn format(args: Arguments) -> string::String { let capacity = args.estimated_capacity(); let mut output = string::String::with_capacity(capacity); - output.write_fmt(args) - .expect("a formatting trait implementation returned an error"); + output + .write_fmt(args) + .expect("a formatting trait implementation returned an error"); output } |
