From 025dcd9b177c6fc5203091785c0b2a00080a1151 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Fri, 21 Jul 2023 19:01:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20feature=20label=20on=20doc?= =?UTF-8?q?s.rs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagetop/Cargo.toml | 1 + pagetop/src/lib.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pagetop/Cargo.toml b/pagetop/Cargo.toml index 970a21f1..a586c23e 100644 --- a/pagetop/Cargo.toml +++ b/pagetop/Cargo.toml @@ -83,3 +83,4 @@ pagetop-build = { version = "0.0", path = "../pagetop-build" } [package.metadata.docs.rs] all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/pagetop/src/lib.rs b/pagetop/src/lib.rs index e5d36925..36892954 100644 --- a/pagetop/src/lib.rs +++ b/pagetop/src/lib.rs @@ -96,6 +96,8 @@ //! Pero también deberán declararse explícitamente estas dependencias en cada módulo para ayudar a //! PageTop a estructurar e inicializar modularmente la aplicación. +#![cfg_attr(docsrs, feature(doc_cfg))] + // ************************************************************************************************* // RE-EXPORTED MACROS. // ************************************************************************************************* @@ -135,6 +137,7 @@ pub mod locale; pub mod html; // Acceso a base de datos. +#[cfg_attr(docsrs, doc(cfg(feature = "database")))] #[cfg(feature = "database")] pub mod db;