mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
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
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user