Skip to content

Commit

Permalink
Add console_without_tokio_unstable to make tokio_unstable asserti…
Browse files Browse the repository at this point in the history
…on optional
  • Loading branch information
ldm0 committed Jul 7, 2023
1 parent 7c8e80a commit 65564d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions console-subscriber/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ impl ConsoleLayer {
// The `cfg` value *appears* to be a constant to clippy, but it changes
// depending on the build-time configuration...
#![allow(clippy::assertions_on_constants)]
#[cfg(not(console_without_tokio_unstable))]
assert!(
cfg!(tokio_unstable),
"task tracing requires Tokio to be built with RUSTFLAGS=\"--cfg tokio_unstable\"!"
Expand Down

0 comments on commit 65564d1

Please sign in to comment.