tokio: use cargo feature for taskdump support instead of cfg (#7655)

Signed-off-by: ADD-SP <[email protected]>
Co-authored-by: Alice Ryhl <[email protected]>
This commit is contained in:
Qi
2025-10-10 11:31:41 +08:00
committed by GitHub
co-authored by Alice Ryhl
parent ad6f618952
commit d1f1499f63
24 changed files with 111 additions and 96 deletions
+3
View File
@@ -24,6 +24,9 @@ httparse = "1.0"
httpdate = "1.0"
once_cell = "1.5.2"
[target.'cfg(all(tokio_unstable, target_os = "linux"))'.dev-dependencies]
tokio = { version = "1.0.0", path = "../tokio", features = ["full", "tracing", "taskdump"] }
[target.'cfg(windows)'.dev-dependencies.windows-sys]
version = "0.61"
-2
View File
@@ -4,7 +4,6 @@
#[cfg(all(
tokio_unstable,
tokio_taskdump,
target_os = "linux",
any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")
))]
@@ -82,7 +81,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
#[cfg(not(all(
tokio_unstable,
tokio_taskdump,
target_os = "linux",
any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")
)))]