about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2020-01-01 14:43:24 -0500
committerMark Rousskov <mark.simulacrum@gmail.com>2020-01-01 15:22:02 -0500
commit73996df6291001f0742b6409249329301aa77a23 (patch)
treeb99e017d8df762e0d4cb8865b5b160d124acc5e8 /src/test/debuginfo/enum-thinlto.rs
parent119307a83e12291a3fc126735d6bd0292c443464 (diff)
downloadrust-73996df6291001f0742b6409249329301aa77a23.tar.gz
rust-73996df6291001f0742b6409249329301aa77a23.zip
Reset Formatter flags on exit from pad_integral
This fixes a bug where after calling pad_integral with appropriate flags, the
fill and alignment flags would be set to '0' and 'Right' and left as such even
after exiting pad_integral, which meant that future calls on the same Formatter
would get incorrect flags reported.

This is quite difficult to observe in practice, as almost all formatting
implementations in practice don't call `Display::fmt` directly, but rather use
`write!` or a similar macro, which means that they cannot observe the effects of
the wrong flags (as `write!` creates a fresh Formatter instance). However, we
include a test case.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions