about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/write.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-07-29 21:26:11 +0200
committerGitHub <noreply@github.com>2024-07-29 21:26:11 +0200
commit9aedec9313dc8ecf9bdcb5f09c4eb0ad8b9a4875 (patch)
treeb9d4fc3ae4b3abc11c5a9dadf910dcd41c5fb660 /compiler/rustc_codegen_llvm/src/back/write.rs
parent66e5852c3bd022e2a589a089a0bc8392f8b291e1 (diff)
parentac303df4e21eabfbf692f2d1959f7403f4887a31 (diff)
downloadrust-9aedec9313dc8ecf9bdcb5f09c4eb0ad8b9a4875.tar.gz
rust-9aedec9313dc8ecf9bdcb5f09c4eb0ad8b9a4875.zip
Rollup merge of #126247 - notriddle:notriddle/word-wrap-item-table, r=GuillaumeGomez
rustdoc: word wrap CamelCase in the item list table and sidebar

This is an alternative to https://github.com/rust-lang/rust/pull/126209. That is, it fixes the issue that affects the very long type names in https://docs.rs/async-stripe/0.31.0/stripe/index.html#structs.

This is, necessarily, a pile of nasty heuristics. We need to balance a few issues:

- Sometimes, there's no real word break. For example, `BTreeMap` should be `BTree<wbr>Map`, not `B<wbr>Tree<wbr>Map`.

- Sometimes, there's a legit word break, but the name is tiny and the HTML overhead isn't worth it. For example, if we're typesetting `TyCtx`, writing `Ty<wbr>Ctx` would have an HTML overhead of 50%. Line breaking inside it makes no sense.

# Screenshots

| Before | After |
| ------ | ----- |
| ![image](https://github.com/rust-lang/rust/assets/1593513/d51201fd-46c0-4f48-aee6-a477eadba288) | ![image](https://github.com/rust-lang/rust/assets/1593513/d8e77582-adcf-4966-bbfd-19dfdad7336a)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
0 files changed, 0 insertions, 0 deletions