-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: use U+2212 for minus sign in integer MIN/MAX text #93612
Conversation
r? @yaahc (rust-highfive has picked a reviewer for you, use r? to override) |
I'm personally a big fan of the actual 'minus sign' character (−), as it matches up nicely with the (ascii) plus sign (+) in width and thickness and spacing. Seeing a hyphen used as minus sign in a variable width font makes the typesetting nerd in me scream. I also agree with your reasoning in #90793 that the parts that this PR is changing are clearly not code (with the superscript notation for power), such that it doesn't matter if it doesn't match the exact character used in Rust expressions. It's also nice for accessibility. For example, Google Translate pronounces '1 - 2' as 'one to two', but '1 − 2' as 'one minus two'. (But none of these tools would pronounce However, I am worried here about maintaining this, because our documentation is part of our code, and usually viewed and edited in monospace, where it's even harder than usual to see the difference between the ascii hyphen-minus (-) and the (non-ascii) real minus sign (−). Our code is collectively maintained by a huge number of people, and this is easily missed by future contributors and reviewers. How about using (In the long term it might be nice to have LaTeX support in rustdoc. (But only if done without javascript. E.g. through (a Rust port of) KaTeX at 'compile' time, rather than with MathJax in the browser.) Then formulas like this can be written as |
I like this; I updated the PR. |
@bors r+ rollup |
📌 Commit d6e1df8 has been approved by |
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#90132 (Stabilize `-Z instrument-coverage` as `-C instrument-coverage`) - rust-lang#91589 (impl `Arc::unwrap_or_clone`) - rust-lang#93495 (kmc-solid: Fix off-by-one error in `SystemTime::now`) - rust-lang#93576 (Emit more valid HTML from rustdoc) - rust-lang#93608 (Clean up `find_library_crate`) - rust-lang#93612 (doc: use U+2212 for minus sign in integer MIN/MAX text) - rust-lang#93615 (Fix `isize` optimization in `StableHasher` for big-endian architectures) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Closes #90793.