Skip to content

Commit

Permalink
feat(subscriber): Add cfg console_without_tokio_unstable
Browse files Browse the repository at this point in the history
Add cfg `console_without_tokio_unstable` for developers to turn off the
assertion on `tokio_unstable`. This is useful for non-tokio runtimes
which has `tokio-console` support.
  • Loading branch information
ldm0 committed Jul 11, 2023
1 parent 7c8e80a commit bc754ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion console-subscriber/src/lib.rs
Expand Up @@ -264,7 +264,7 @@ impl ConsoleLayer {
// depending on the build-time configuration...
#![allow(clippy::assertions_on_constants)]
assert!(
cfg!(tokio_unstable),
cfg!(any(tokio_unstable, console_without_tokio_unstable)),
"task tracing requires Tokio to be built with RUSTFLAGS=\"--cfg tokio_unstable\"!"
);

Expand Down

0 comments on commit bc754ef

Please sign in to comment.