From 2f406e63a43e35b169c87ac8f973080ff95489ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 7 Apr 2021 12:17:36 +0200 Subject: [PATCH] docs: Add missing doc_cfg --- ruma-events/src/lib.rs | 1 + ruma-events/src/room/message.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/ruma-events/src/lib.rs b/ruma-events/src/lib.rs index 54f4c3a2..7c8d323e 100644 --- a/ruma-events/src/lib.rs +++ b/ruma-events/src/lib.rs @@ -113,6 +113,7 @@ #![recursion_limit = "1024"] #![warn(missing_debug_implementations, missing_docs, rust_2018_idioms)] +#![cfg_attr(docsrs, feature(doc_cfg))] // This lint is no good #![allow(clippy::new_without_default)] // Remove this once our MSRV is >= 1.53 diff --git a/ruma-events/src/room/message.rs b/ruma-events/src/room/message.rs index 8a6ea944..ca0feaaa 100644 --- a/ruma-events/src/room/message.rs +++ b/ruma-events/src/room/message.rs @@ -489,6 +489,7 @@ impl TextMessageEventContent { /// A convenience constructor to create a markdown message. #[cfg(feature = "markdown")] + #[cfg_attr(docsrs, doc(cfg(feature = "markdown")))] pub fn markdown(body: impl Into) -> Self { let body = body.into(); let mut html_body = String::new();