diff options
| author | Alexis Hunt <lexer@google.com> | 2018-03-26 21:18:50 -0400 |
|---|---|---|
| committer | Alexis Hunt <lexer@google.com> | 2018-03-26 21:18:50 -0400 |
| commit | 554dd3e350721a7064932719ec925d1a1b5eb552 (patch) | |
| tree | 56a248e4cd520313ebf563a4830f8d66c0616d3f | |
| parent | 5570cdcc9e7da0cca84e394e872bc16df2c6dc50 (diff) | |
| download | rust-554dd3e350721a7064932719ec925d1a1b5eb552.tar.gz rust-554dd3e350721a7064932719ec925d1a1b5eb552.zip | |
Add missing '?' to format grammar.
| -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 a092bfb3b0a..c69c2cd98c8 100644 --- a/src/liballoc/fmt.rs +++ b/src/liballoc/fmt.rs @@ -324,7 +324,7 @@ //! sign := '+' | '-' //! width := count //! precision := count | '*' -//! type := identifier | '' +//! type := identifier | '?' | '' //! count := parameter | integer //! parameter := argument '$' //! ``` @@ -514,17 +514,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}; @@ -561,7 +561,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 } |
