rust/src
Stuart Cook 92bc467f36
Rollup merge of #146068 - Zalathar:panic-hook, r=jieyouxu
compiletest: Capture panic messages via a custom panic hook

Currently, output-capture of panic messages relies on special cooperation between `#![feature(internal_output_capture)]` and the default panic hook. That's a problem if we want to perform our own output capture, because the default panic hook won't know about our custom output-capture mechanism.

We can work around that by installing a custom panic hook that prints equivalent panic messages to a buffer instead.

The custom hook is always installed, but delegates to the default panic hook unless a panic-capture buffer has been installed on the current thread. A panic-capture buffer is only installed on compiletest test threads (by the executor), and only if output-capture is enabled.

---

Right now this PR doesn't provide any particular concrete benefits. But it will be essential as part of further efforts to replace compiletest's use of `#![feature(internal_output_capture)]` with our own output-capture mechanism.

r? jieyouxu
2025-09-01 17:35:05 +10:00
..
bootstrap Auto merge of #145663 - Kobzol:bootstrap-test, r=jieyouxu 2025-09-01 01:30:27 +00:00
build_helper Fix some minor issues in comments 2025-08-24 16:58:22 +08:00
ci Auto merge of #145663 - Kobzol:bootstrap-test, r=jieyouxu 2025-09-01 01:30:27 +00:00
doc Auto merge of #123319 - no92:managarm-target, r=davidtwco 2025-08-30 07:59:16 +00:00
etc Rollup merge of #145596 - lumiscosity:optimize-png-files, r=davidtwco 2025-08-26 16:34:12 +02:00
gcc@4e995bd73c Update GCC submodule 2025-08-26 18:09:42 +02:00
librustdoc Auto merge of #146038 - notriddle:polarity, r=GuillaumeGomez 2025-08-31 20:28:35 +00:00
llvm-project@19f0a49c5c Update to LLVM 21.1.0 2025-08-26 17:15:13 +02:00
rustc-std-workspace update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustdoc-json-types Add new doc(attribute = "...") attribute 2025-08-28 15:56:29 +02:00
tools Rollup merge of #146068 - Zalathar:panic-hook, r=jieyouxu 2025-09-01 17:35:05 +10:00
README.md
stage0 bump stage0 2025-08-06 13:22:38 +01:00
version bump version 2025-08-01 09:04:01 +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.