about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2022-09-09 15:36:37 +0200
committerGitHub <noreply@github.com>2022-09-09 15:36:37 +0200
commitff21ccfba18760659aa81c9b7e347d54a0ba2833 (patch)
treee22d38f4e43429ec4c218c57363e0fd1aac324d1 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3ec332fc82596e7f80311fa142035945729ce156 (diff)
parent5fbe485ecca977e3981d9dbcc5370183528d50a7 (diff)
downloadrust-ff21ccfba18760659aa81c9b7e347d54a0ba2833.tar.gz
rust-ff21ccfba18760659aa81c9b7e347d54a0ba2833.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_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions