Skip to content

Commit 554dd3e

Browse files
author
Alexis Hunt
committed
Add missing '?' to format grammar.
1 parent 5570cdc commit 554dd3e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Diff for: src/liballoc/fmt.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@
324324
//! sign := '+' | '-'
325325
//! width := count
326326
//! precision := count | '*'
327-
//! type := identifier | ''
327+
//! type := identifier | '?' | ''
328328
//! count := parameter | integer
329329
//! parameter := argument '$'
330330
//! ```
@@ -514,17 +514,17 @@ pub use core::fmt::rt;
514514
#[stable(feature = "rust1", since = "1.0.0")]
515515
pub use core::fmt::{Formatter, Result, Write};
516516
#[stable(feature = "rust1", since = "1.0.0")]
517-
pub use core::fmt::{Octal, Binary};
517+
pub use core::fmt::{Binary, Octal};
518518
#[stable(feature = "rust1", since = "1.0.0")]
519-
pub use core::fmt::{Display, Debug};
519+
pub use core::fmt::{Debug, Display};
520520
#[stable(feature = "rust1", since = "1.0.0")]
521-
pub use core::fmt::{LowerHex, UpperHex, Pointer};
521+
pub use core::fmt::{LowerHex, Pointer, UpperHex};
522522
#[stable(feature = "rust1", since = "1.0.0")]
523523
pub use core::fmt::{LowerExp, UpperExp};
524524
#[stable(feature = "rust1", since = "1.0.0")]
525525
pub use core::fmt::Error;
526526
#[stable(feature = "rust1", since = "1.0.0")]
527-
pub use core::fmt::{ArgumentV1, Arguments, write};
527+
pub use core::fmt::{write, ArgumentV1, Arguments};
528528
#[stable(feature = "rust1", since = "1.0.0")]
529529
pub use core::fmt::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};
530530

@@ -561,7 +561,8 @@ use string;
561561
pub fn format(args: Arguments) -> string::String {
562562
let capacity = args.estimated_capacity();
563563
let mut output = string::String::with_capacity(capacity);
564-
output.write_fmt(args)
565-
.expect("a formatting trait implementation returned an error");
564+
output
565+
.write_fmt(args)
566+
.expect("a formatting trait implementation returned an error");
566567
output
567568
}

0 commit comments

Comments
 (0)