diff --git a/crates/ruma-events/Cargo.toml b/crates/ruma-events/Cargo.toml index 4451b6ec..aeb2f6b4 100644 --- a/crates/ruma-events/Cargo.toml +++ b/crates/ruma-events/Cargo.toml @@ -20,6 +20,7 @@ compat = ["ruma-events-macros/compat"] markdown = ["pulldown-cmark"] unstable-exhaustive-types = [] +unstable-pdu = [] unstable-pre-spec = [] [dependencies] diff --git a/crates/ruma-events/src/lib.rs b/crates/ruma-events/src/lib.rs index f4810675..471f8b48 100644 --- a/crates/ruma-events/src/lib.rs +++ b/crates/ruma-events/src/lib.rs @@ -161,6 +161,8 @@ pub mod forwarded_room_key; pub mod fully_read; pub mod ignored_user_list; pub mod key; +#[cfg(feature = "unstable-pdu")] +#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pdu")))] pub mod pdu; pub mod policy; pub mod presence; diff --git a/crates/ruma-events/tests/pdu.rs b/crates/ruma-events/tests/pdu.rs index 22dede0e..d1043431 100644 --- a/crates/ruma-events/tests/pdu.rs +++ b/crates/ruma-events/tests/pdu.rs @@ -1,4 +1,4 @@ -#![cfg(not(feature = "unstable-pre-spec"))] +#![cfg(all(feature = "unstable-pdu", not(feature = "unstable-pre-spec")))] use std::{collections::BTreeMap, convert::TryInto}; diff --git a/crates/ruma-state-res/Cargo.toml b/crates/ruma-state-res/Cargo.toml index d01995fd..69385c9a 100644 --- a/crates/ruma-state-res/Cargo.toml +++ b/crates/ruma-state-res/Cargo.toml @@ -34,6 +34,7 @@ tracing = "0.1.26" criterion = "0.3.3" maplit = "1.0.2" rand = "0.8.3" +ruma-events = { version = "0.24.5", path = "../ruma-events", features = ["unstable-pdu"] } tracing-subscriber = "0.2.15" [[bench]]