From 3faba7beb66d8b23deb1b21eaa7053018e4905e0 Mon Sep 17 00:00:00 2001 From: James Munns Date: Thu, 5 May 2022 20:54:44 +0200 Subject: [PATCH] subscriber: don't enable `tracing-core` features by default (#2107) This attempts to address #2106 by disabling the `tracing-core` crate's default features in `tracing-subscriber`'s dependency. Now, `tracing-core`'s optional "alloc" feature is only enabled when "tracing-subscriber/alloc" is enabled. Closes #2106 --- tracing-subscriber/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index 746793f86b..f7e55244dc 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -25,7 +25,7 @@ rust-version = "1.49.0" [features] default = ["smallvec", "fmt", "ansi", "tracing-log", "std"] -alloc = [] +alloc = ["tracing-core/alloc"] std = ["alloc", "tracing-core/std"] env-filter = ["matchers", "regex", "lazy_static", "tracing", "std", "thread_local"] fmt = ["registry", "std"] @@ -37,7 +37,7 @@ json = ["tracing-serde", "serde", "serde_json"] local-time = ["time/local-offset"] [dependencies] -tracing-core = { path = "../tracing-core", version = "0.2" } +tracing-core = { path = "../tracing-core", version = "0.2", default-features = false } # only required by the `env-filter` feature tracing = { optional = true, path = "../tracing", version = "0.2", default-features = false }