diff options
Diffstat (limited to 'src/runtime/handle.rs')
-rw-r--r-- | src/runtime/handle.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/handle.rs b/src/runtime/handle.rs index 138d13b..6ff3c39 100644 --- a/src/runtime/handle.rs +++ b/src/runtime/handle.rs @@ -142,7 +142,7 @@ impl Handle { F: Future + Send + 'static, F::Output: Send + 'static, { - #[cfg(feature = "tracing")] + #[cfg(all(tokio_unstable, feature = "tracing"))] let future = crate::util::trace::task(future, "task"); self.spawner.spawn(future) } @@ -172,7 +172,7 @@ impl Handle { F: FnOnce() -> R + Send + 'static, R: Send + 'static, { - #[cfg(feature = "tracing")] + #[cfg(all(tokio_unstable, feature = "tracing"))] let func = { #[cfg(tokio_track_caller)] let location = std::panic::Location::caller(); |