rust/src
Guillaume Gomez ba32d8bdee
Rollup merge of #136829 - GuillaumeGomez:move-line-numbers-into-code, r=notriddle
[rustdoc] Move line numbers into the `<code>` directly

Fixes #84242.

This is the first for adding support for https://github.com/rust-lang/rust/issues/127334 and also for another feature I'm working on.

A side-effect of this change is that it also fixes source code pages display in lynx since they're not directly in the source code.

To allow having code wrapping, the grid approach doesn't work as the line numbers are in their own container, so we need to move them into the code. Now with this, it becomes much simpler to do what we want (with CSS mostly). One downside: the highlighting became more complex and slow as we need to generate some extra HTML tags directly into the highlighting process. However that also allows to not have a huge HTML size increase.

You can test the result [here](https://rustdoc.crud.net/imperio/move-line-numbers-into-code/scrape_examples/fn.test_many.html) and [here](https://rustdoc.crud.net/imperio/move-line-numbers-into-code/src/scrape_examples/lib.rs.html#10).

The appearance should have close to no changes.

r? ``@notriddle``
2025-02-12 10:46:39 +01:00
..
bootstrap Rollup merge of #136767 - onur-ozkan:is-host-target, r=albertlarsan68,jieyouxu 2025-02-12 10:46:38 +01:00
build_helper Update username in build helper example 2025-01-28 10:51:30 +01:00
ci Auto merge of #136571 - marcoieni:ubuntu-24-large-runners, r=Mark-Simulacrum 2025-02-11 13:06:54 +00:00
doc Rollup merge of #136698 - jackpot51:i586-redox, r=RalfJung 2025-02-12 10:46:37 +01:00
etc Update bootstrap completions 2025-02-05 15:33:40 +01:00
gcc@fd3498bff0 Update GCC version 2024-09-06 16:01:46 +02:00
librustdoc Rollup merge of #136829 - GuillaumeGomez:move-line-numbers-into-code, r=notriddle 2025-02-12 10:46:39 +01:00
llvm-project@7e8c93c87c Update to LLVM 19.1.7 2025-01-14 14:46:09 +01:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types rustdoc-json-types: Document that crate name isn't package name. 2025-02-01 19:57:59 +00:00
tools Rollup merge of #136698 - jackpot51:i586-redox, r=RalfJung 2025-02-12 10:46:37 +01:00
README.md
stage0 Update bootstrap compiler and rustfmt 2025-02-08 22:07:11 +00:00
version bump version 2025-01-03 10:36:06 +01:00

This directory contains some source code for the Rust project, including:

  • The bootstrapping build system
  • Various submodules for tools, like cargo, tidy, etc.

For more information on how various parts of the compiler work, see the rustc dev guide.