about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/lib.rs
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-09-09 22:02:17 +0530
committerGitHub <noreply@github.com>2022-09-09 22:02:17 +0530
commitfcdd5016c518c3ac3e46183933c65dc23c9f5f51 (patch)
treed354f1c6548ac39387ee7fe2d62ec6666a212078 /compiler/rustc_codegen_llvm/src/lib.rs
parentbef48f931489c2ad263948d6b21aca9c2e3ca2f4 (diff)
parent5fbe485ecca977e3981d9dbcc5370183528d50a7 (diff)
downloadrust-fcdd5016c518c3ac3e46183933c65dc23c9f5f51.tar.gz
rust-fcdd5016c518c3ac3e46183933c65dc23c9f5f51.zip
Rollup merge of #101529 - mousetail:patch-2, r=thomcc
Fix the example code and doctest for Formatter::sign_plus

The provided example to the `sign_plus` method on `fmt` was broken, it displays the `-` sign twice for negative numbers.

This pull request should fix the issue by `.abs()` ing the number so that the negative sign appears only once. It is just one possible solution to the issue, not sure if it's the best. However, this one will behave as expected when combined with fill and alignment operators.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
0 files changed, 0 insertions, 0 deletions