Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 515be00

Browse files
authoredMar 6, 2025
Merge pull request rust-lang#2269 from moxian/patch-1
Don't suggest explicitly `cfg`-gating `trace!` calls in bootstrap
2 parents 69369a7 + 243f569 commit 515be00

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎src/doc/rustc-dev-guide/src/building/bootstrapping/debugging-bootstrap.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Both `tracing::*` macros and the `tracing::instrument` proc-macro attribute need
129129

130130
```rs
131131
#[cfg(feature = "tracing")]
132-
use tracing::{instrument, trace};
132+
use tracing::instrument;
133133

134134
struct Foo;
135135

@@ -138,7 +138,6 @@ impl Step for Foo {
138138

139139
#[cfg_attr(feature = "tracing", instrument(level = "trace", name = "Foo::should_run", skip_all))]
140140
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
141-
#[cfg(feature = "tracing")]
142141
trace!(?run, "entered Foo::should_run");
143142

144143
todo!()
@@ -154,7 +153,6 @@ impl Step for Foo {
154153
),
155154
)]
156155
fn run(self, builder: &Builder<'_>) -> Self::Output {
157-
#[cfg(feature = "tracing")]
158156
trace!(?run, "entered Foo::run");
159157

160158
todo!()

0 commit comments

Comments
 (0)
Failed to load comments.