Skip to content

Commit b4bc2b0

Browse files
authored
Rollup merge of #49401 - alercah:format, r=cramertj
Add missing '?' to format grammar.
2 parents 2d05bde + 554dd3e commit b4bc2b0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/liballoc/fmt.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@
326326
//! sign := '+' | '-'
327327
//! width := count
328328
//! precision := count | '*'
329-
//! type := identifier | ''
329+
//! type := identifier | '?' | ''
330330
//! count := parameter | integer
331331
//! parameter := argument '$'
332332
//! ```
@@ -516,17 +516,17 @@ pub use core::fmt::rt;
516516
#[stable(feature = "rust1", since = "1.0.0")]
517517
pub use core::fmt::{Formatter, Result, Write};
518518
#[stable(feature = "rust1", since = "1.0.0")]
519-
pub use core::fmt::{Octal, Binary};
519+
pub use core::fmt::{Binary, Octal};
520520
#[stable(feature = "rust1", since = "1.0.0")]
521-
pub use core::fmt::{Display, Debug};
521+
pub use core::fmt::{Debug, Display};
522522
#[stable(feature = "rust1", since = "1.0.0")]
523-
pub use core::fmt::{LowerHex, UpperHex, Pointer};
523+
pub use core::fmt::{LowerHex, Pointer, UpperHex};
524524
#[stable(feature = "rust1", since = "1.0.0")]
525525
pub use core::fmt::{LowerExp, UpperExp};
526526
#[stable(feature = "rust1", since = "1.0.0")]
527527
pub use core::fmt::Error;
528528
#[stable(feature = "rust1", since = "1.0.0")]
529-
pub use core::fmt::{ArgumentV1, Arguments, write};
529+
pub use core::fmt::{write, ArgumentV1, Arguments};
530530
#[stable(feature = "rust1", since = "1.0.0")]
531531
pub use core::fmt::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};
532532

@@ -563,7 +563,8 @@ use string;
563563
pub fn format(args: Arguments) -> string::String {
564564
let capacity = args.estimated_capacity();
565565
let mut output = string::String::with_capacity(capacity);
566-
output.write_fmt(args)
567-
.expect("a formatting trait implementation returned an error");
566+
output
567+
.write_fmt(args)
568+
.expect("a formatting trait implementation returned an error");
568569
output
569570
}

0 commit comments

Comments
 (0)