diff options
| author | Jana Dönszelmann <jonathan@donsz.nl> | 2025-07-31 17:19:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-31 17:19:37 +0200 |
| commit | 1fe488638b7bcdf43d69b5c075095109fce25eac (patch) | |
| tree | 6baa792f5c68012469f650b6048b0f72f17d83e3 /compiler/rustc_codegen_gcc | |
| parent | 3fb1b53a9dbfcdf37a4b67d35cde373316829930 (diff) | |
| parent | bb08a4dfc784ad5558e42db3b41b4abbebafc5a9 (diff) | |
| download | rust-1fe488638b7bcdf43d69b5c075095109fce25eac.tar.gz rust-1fe488638b7bcdf43d69b5c075095109fce25eac.zip | |
Rollup merge of #144688 - Stypox:better-enter-trace-span, r=RalfJung
Uniform `enter_trace_span!` and add documentation
1. The latest changes to `enter_trace_span!` were ported from Miri (see https://github.com/rust-lang/miri/pull/4452#discussion_r2204958019), so now both the `rustc_const_eval` and the Miri macro accept the same syntax. Furthermore, the Miri macro was changed to just call rustc_const_eval`'s, to avoid duplication.
2. I made the `layout_of` (& friends) calls use that new syntax, e.g. `enter_trace_span!(layouting::layout_of, ...)`
3. I made sure the macro specifies all types/traits/macros it refers to using `$crate::`, so the macro works anywhere independently of which types/traits/macros are imported in the context it is used in.
4. I added documentation, examples and tips to the macro's doc. To make the rustdoc compile I had to add some hidden lines (`#`), but now it acts as a compilation test which will avoid reintroducing issue 3. in the future. I will also create a documentation file with everything one needs to know about tracing at a later point, but I figured adding some of that info directly on the tracing macro makes it more discoverable.
5. In `stack.rs` I made it so that the `"frame"` span has a field named "frame" (instead of "message") with the data about the frame. This field used to be called "message" (tracing's default) since it was previously formatted using `"{}", instance`, and now I replaced it with `frame = %instance`.
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
