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();