about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-15 21:51:42 +0900
committerGitHub <noreply@github.com>2020-01-15 21:51:42 +0900
commite800fe199cbfbbaa46dfa519e46b594512c068be (patch)
tree0b15d5a0f1ff7fa3c14d9179462362562735ec66 /src/test/debuginfo/enum-thinlto.rs
parent632387f38dfbac0f2b8b8900c840fff7f1fb888e (diff)
parent73996df6291001f0742b6409249329301aa77a23 (diff)
downloadrust-e800fe199cbfbbaa46dfa519e46b594512c068be.tar.gz
rust-e800fe199cbfbbaa46dfa519e46b594512c068be.zip
Rollup merge of #67784 - Mark-Simulacrum:residual-pad-integral, r=dtolnay
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.

A manual check leads me to believe this is the only case where we failed to reset the flags appropriately, but I could have missed something.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions