@@ -86,6 +86,8 @@ test-util = ["rt", "sync", "time"]
86
86
time = []
87
87
# Unstable feature. Requires `--cfg tokio_unstable` to enable.
88
88
io-uring = [" dep:io-uring" , " libc" , " mio/os-poll" , " mio/os-ext" , " dep:slab" ]
89
+ # Unstable feature. Requires `--cfg tokio_unstable` to enable.
90
+ taskdump = [" dep:backtrace" ]
89
91
90
92
[dependencies ]
91
93
tokio-macros = { version = " ~2.5.0" , path = " ../tokio-macros" , optional = true }
@@ -112,11 +114,7 @@ io-uring = { version = "0.7.6", default-features = false, optional = true }
112
114
libc = { version = " 0.2.168" , optional = true }
113
115
mio = { version = " 1.0.1" , default-features = false , features = [" os-poll" , " os-ext" ], optional = true }
114
116
slab = { version = " 0.4.9" , optional = true }
115
-
116
- # Currently unstable. The API exposed by these features may be broken at any time.
117
- # Requires `--cfg tokio_unstable` to enable.
118
- [target .'cfg(tokio_taskdump)' .dependencies ]
119
- backtrace = { version = " 0.3.58" }
117
+ backtrace = { version = " 0.3.58" , optional = true }
120
118
121
119
[target .'cfg(unix)' .dependencies ]
122
120
libc = { version = " 0.2.168" , optional = true }
@@ -169,10 +167,10 @@ tracing-mock = "= 0.1.0-beta.1"
169
167
[package .metadata .docs .rs ]
170
168
all-features = true
171
169
# enable unstable features in the documentation
172
- rustdoc-args = [" --cfg" , " docsrs" , " --cfg" , " tokio_unstable" , " --cfg " , " tokio_taskdump " ]
173
- # it's necessary to _also_ pass `--cfg tokio_unstable` and `--cfg tokio_taskdump`
170
+ rustdoc-args = [" --cfg" , " docsrs" , " --cfg" , " tokio_unstable" ]
171
+ # it's necessary to _also_ pass `--cfg tokio_unstable`
174
172
# to rustc, or else dependencies will not be enabled, and the docs build will fail.
175
- rustc-args = [" --cfg" , " tokio_unstable" , " --cfg " , " tokio_taskdump " ]
173
+ rustc-args = [" --cfg" , " tokio_unstable" ]
176
174
177
175
[package .metadata .playground ]
178
176
features = [" full" , " test-util" ]
0 commit comments