From 31de5b4271a3d609b04f02ca2ea8f39fdbbbaa66 Mon Sep 17 00:00:00 2001 From: Andy Lok Date: Wed, 14 Aug 2024 18:52:53 +0800 Subject: [PATCH] docs: show feature flag notation on docs.rs (#50) --- Cargo.toml | 2 +- src/lib.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 79cfe5c..af2659f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ keywords = ["logging", "log", "opentelemetry", "fastrace"] [package.metadata.docs.rs] all-features = true -rustdoc-args = ["--cfg", "docs"] +rustdoc-args = ["--cfg", "docsrs"] [features] fastrace = ["dep:fastrace"] diff --git a/src/lib.rs b/src/lib.rs index e05f557..51400c9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,6 +53,8 @@ //! //! Read more demos under the [examples](https://github.com/fast/logforth/tree/main/examples) directory. +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + pub mod append; pub mod filter; pub mod layout;