rust/src
Guillaume Gomez 90f6fe852b
Rollup merge of #85117 - jsha:bubble-bubble-toil-and-trouble, r=GuillaumeGomez
Move global click handlers to per-element ones.

In rustdoc's main.js, we had an onclick handler for the whole document that would dispatch to handlers for various elements. This change attaches the handlers to the elements that trigger them, instead. This simplifies the code and avoids reimplementing the browser's bubbling functionality.

As part of this change, change from a class to an id for help button.

Move the handlers and associated code for highlighting source lines into source-script.js (and factor out a shared regex).

Demo at https://hoffman-andrews.com/rust/bubble-bubble-toil-and-trouble/std/string/struct.String.html

Note: this conflicts with / depends on #85074. Once that's merged I'll rebase this and resolve conflicts.

Part of #83332. Thanks to `@Manishearth` for the [suggestion to not reimplement bubbling](https://github.com/rust-lang/rust/issues/83332#issuecomment-803497509).

r? `@GuillaumeGomez`
2021-05-12 17:19:27 +02:00
..
bootstrap Rollup merge of #85191 - GuillaumeGomez:improve-rustdoc-gui-tester, r=Mark-Simulacrum 2021-05-12 07:18:05 +09:00
build_helper
ci update perf version used for PGO 2021-05-10 14:39:28 +02:00
doc remove const_fn feature gate 2021-05-09 14:29:31 +02:00
etc Fix HashMap/HashSet LLDB pretty-printer after hashbrown 0.11.0 2021-04-06 12:44:17 +03:00
librustdoc Rollup merge of #85117 - jsha:bubble-bubble-toil-and-trouble, r=GuillaumeGomez 2021-05-12 17:19:27 +02:00
llvm-project@c78cf18a07 Update LLVM submodule 2021-05-08 11:01:09 +02:00
rustdoc-json-types rustdoc-json: Rename Import.span to Import.source 2021-03-21 19:47:12 -07:00
test Rollup merge of #84793 - estebank:parse-struct-field-default, r=davidtwco 2021-05-12 17:19:25 +02:00
tools Auto merge of #83813 - cbeuw:remap-std, r=michaelwoerister 2021-05-12 11:05:56 +00:00
README.md update message 2021-02-14 10:08:37 +05:30
stage0.txt Bump bootstrap compiler 2021-04-06 18:24:09 -07:00
version bump version to 1.54.0 2021-04-30 15:24:00 +02:00

This directory contains the source code of the rust project, including:

  • The test suite
  • The bootstrapping build system
  • Various submodules for tools, like rustdoc, rls, etc.

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