Skip to content

Commit

Permalink
Merge pull request #2269 from moxian/patch-1
Browse files Browse the repository at this point in the history
Don't suggest explicitly `cfg`-gating `trace!` calls in bootstrap
  • Loading branch information
jieyouxu authored Mar 6, 2025
2 parents 49ff258 + aab4806 commit 3684751
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/building/bootstrapping/debugging-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Both `tracing::*` macros and the `tracing::instrument` proc-macro attribute need

```rs
#[cfg(feature = "tracing")]
use tracing::{instrument, trace};
use tracing::instrument;

struct Foo;

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

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

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

todo!()
Expand Down

0 comments on commit 3684751

Please sign in to comment.