diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-06-30 19:26:03 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-06-30 19:26:03 -0700 |
| commit | 98566ea951fec6d359e2d98367d34c06e2243ee2 (patch) | |
| tree | 9366431f53db3c2f163f2a1b228a4ddd25edfbab /src/libcoretest | |
| parent | 0b703787ab23f004fe9f635971933c6e9a9c6683 (diff) | |
| download | rust-98566ea951fec6d359e2d98367d34c06e2243ee2.tar.gz rust-98566ea951fec6d359e2d98367d34c06e2243ee2.zip | |
std: Fix formatting flags for chars
This recently regressed in #24689, and this updates the `Display` implementation to take formatting flags into account. Closes #26625
Diffstat (limited to 'src/libcoretest')
| -rw-r--r-- | src/libcoretest/fmt/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcoretest/fmt/mod.rs b/src/libcoretest/fmt/mod.rs index cdb9c38f027..42872589bb0 100644 --- a/src/libcoretest/fmt/mod.rs +++ b/src/libcoretest/fmt/mod.rs @@ -16,4 +16,6 @@ fn test_format_flags() { // No residual flags left by pointer formatting let p = "".as_ptr(); assert_eq!(format!("{:p} {:x}", p, 16), format!("{:p} 10", p)); + + assert_eq!(format!("{: >3}", 'a'), " a"); } |
