Skip to content

Commit

Permalink
Rollup merge of #49401 - alercah:format, r=cramertj
Browse files Browse the repository at this point in the history
Add missing '?' to format grammar.
  • Loading branch information
kennytm authored Mar 27, 2018
2 parents 2d05bde + 554dd3e commit b4bc2b0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/liballoc/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
//! sign := '+' | '-'
//! width := count
//! precision := count | '*'
//! type := identifier | ''
//! type := identifier | '?' | ''
//! count := parameter | integer
//! parameter := argument '$'
//! ```
Expand Down Expand Up @@ -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};

Expand Down Expand Up @@ -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
}

0 comments on commit b4bc2b0

Please sign in to comment.