rust/src
León Orell Valerian Liehr 9830837ab3
Rollup merge of #136392 - jieyouxu:wrap-tracing, r=onur-ozkan
bootstrap: add wrapper macros for `feature = "tracing"`-gated `tracing` macros

Follow-up to https://github.com/rust-lang/rust/pull/136091#discussion_r1930219425.

- Add wrapper macros for `error!`, `warn!`, `info!`, `debug!` and `trace!`, which `cfg(feature = "tracing")`-gates the underlying `tracing` macros. They expand to nothing if `"tracing"` feature is not enabled.
- This is not done for `span!` or `event!` because they can return span guards, and you can't really wrap that.
- This is also not possible for `tracing::instrument` attribute proc-macro unless you use another attribute proc-macro to wrap that.

It's not *great*, because `tracing::instrument` and `tracing::{span,event}` can't be wrapped this way.

Can test locally with:

```bash
$ BOOTSTRAP_TRACING=bootstrap=TRACE ./x check src/bootstrap/
```

r? ``@onur-ozkan`` (or reroll)
2025-02-05 05:03:04 +01:00
..
bootstrap Rollup merge of #136392 - jieyouxu:wrap-tracing, r=onur-ozkan 2025-02-05 05:03:04 +01:00
build_helper Update username in build helper example 2025-01-28 10:51:30 +01:00
ci Auto merge of #136483 - marcoieni:dist-x86_64-msvc-windows-25, r=Kobzol 2025-02-03 22:51:35 +00:00
doc Rollup merge of #136167 - pitaj:new_range, r=Nadrieril 2025-02-04 05:36:52 -05:00
etc Rollup merge of #135812 - Walnut356:gdb_osstring, r=Mark-Simulacrum 2025-01-26 01:51:15 -05:00
gcc@fd3498bff0 Update GCC version 2024-09-06 16:01:46 +02:00
librustdoc Rollup merge of #136263 - notriddle:notriddle/typescript2, r=fmease 2025-02-05 05:03:02 +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 Rollup merge of #135799 - aDotInTheVoid:skrrt-skrrt-revrrt, r=GuillaumeGomez 2025-01-24 08:08:08 +01:00
tools Rollup merge of #128045 - pnkfelix:rustc-contracts, r=oli-obk 2025-02-05 05:03:01 +01:00
README.md
stage0 bump stage0 2025-01-08 20:03:28 +01: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.