From 2cae482a6b83bc39f793a0e22a9c6411f790c894 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 29 Nov 2023 11:58:49 -0500 Subject: [PATCH] Document crate features guarded items on docs.rs --- Cargo.toml | 1 + src/error.rs | 2 +- src/lib.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a5dd834a..058b15de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,4 +56,5 @@ required-features = ["completion"] no_individual_tags = true [package.metadata.docs.rs] +rustdoc-args = ["--cfg", "docsrs"] all-features = true diff --git a/src/error.rs b/src/error.rs index e9cf9abc..dc86560b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,5 +10,5 @@ pub enum Error { IO(#[from] IoError), } -/// Result type where errors are of type [Error](crate::error::Error) +/// Result type where errors are of type [Error](enum@Error). pub type Result = StdResult; diff --git a/src/lib.rs b/src/lib.rs index 46bf30cb..68dfd2b2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,6 +30,7 @@ //! By default `editor` and `password` are enabled. #![deny(clippy::all)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] pub use console;