diff --git a/crates/ruma-client-api/src/r0.rs b/crates/ruma-client-api/src/r0.rs index 296a294b..f75bf8c4 100644 --- a/crates/ruma-client-api/src/r0.rs +++ b/crates/ruma-client-api/src/r0.rs @@ -13,7 +13,6 @@ pub mod directory; pub mod filter; pub mod keys; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod knock; pub mod media; pub mod membership; diff --git a/crates/ruma-client-api/src/r0/backup.rs b/crates/ruma-client-api/src/r0/backup.rs index 8a79e11a..e7240252 100644 --- a/crates/ruma-client-api/src/r0/backup.rs +++ b/crates/ruma-client-api/src/r0/backup.rs @@ -1,6 +1,5 @@ //! Endpoints for server-side key backups. #![cfg(feature = "unstable-pre-spec")] -#![cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod add_backup_key_session; pub mod add_backup_key_sessions; diff --git a/crates/ruma-client-api/src/r0/directory.rs b/crates/ruma-client-api/src/r0/directory.rs index 49afbd1e..9e504d93 100644 --- a/crates/ruma-client-api/src/r0/directory.rs +++ b/crates/ruma-client-api/src/r0/directory.rs @@ -58,7 +58,6 @@ pub struct PublicRoomsChunk { /// The joining rule for the room. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(skip_serializing_if = "Option::is_none")] pub join_rule: Option, } diff --git a/crates/ruma-client-api/src/r0/keys.rs b/crates/ruma-client-api/src/r0/keys.rs index 14f6b6b5..3a44f615 100644 --- a/crates/ruma-client-api/src/r0/keys.rs +++ b/crates/ruma-client-api/src/r0/keys.rs @@ -6,8 +6,6 @@ pub mod get_keys; pub mod upload_keys; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod upload_signatures; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod upload_signing_keys; diff --git a/crates/ruma-client-api/src/r0/keys/get_keys.rs b/crates/ruma-client-api/src/r0/keys/get_keys.rs index 84fde6ae..f56986bc 100644 --- a/crates/ruma-client-api/src/r0/keys/get_keys.rs +++ b/crates/ruma-client-api/src/r0/keys/get_keys.rs @@ -58,19 +58,16 @@ ruma_api! { /// Information on the master cross-signing keys of the queried users. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub master_keys: BTreeMap, /// Information on the self-signing keys of the queried users. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub self_signing_keys: BTreeMap, /// Information on the user-signing keys of the queried users. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub user_signing_keys: BTreeMap, } diff --git a/crates/ruma-client-api/src/r0/media/create_content.rs b/crates/ruma-client-api/src/r0/media/create_content.rs index 1a657b87..6bdeb237 100644 --- a/crates/ruma-client-api/src/r0/media/create_content.rs +++ b/crates/ruma-client-api/src/r0/media/create_content.rs @@ -33,7 +33,6 @@ ruma_api! { /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[ruma_api(query)] #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(default, skip_serializing_if = "ruma_serde::is_default", rename = "xyz.amorgan.blurhash")] pub generate_blurhash: bool, } @@ -47,7 +46,6 @@ ruma_api! { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, diff --git a/crates/ruma-client-api/src/r0/membership/invite_user.rs b/crates/ruma-client-api/src/r0/membership/invite_user.rs index 72257c3e..eeb5d672 100644 --- a/crates/ruma-client-api/src/r0/membership/invite_user.rs +++ b/crates/ruma-client-api/src/r0/membership/invite_user.rs @@ -35,7 +35,6 @@ ruma_api! { /// Optional reason for inviting the user. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<&'a str>, } diff --git a/crates/ruma-client-api/src/r0/membership/join_room_by_id.rs b/crates/ruma-client-api/src/r0/membership/join_room_by_id.rs index 786bd3e2..0c0036ca 100644 --- a/crates/ruma-client-api/src/r0/membership/join_room_by_id.rs +++ b/crates/ruma-client-api/src/r0/membership/join_room_by_id.rs @@ -27,7 +27,6 @@ ruma_api! { /// Optional reason for joining the room. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<&'a str>, } diff --git a/crates/ruma-client-api/src/r0/membership/join_room_by_id_or_alias.rs b/crates/ruma-client-api/src/r0/membership/join_room_by_id_or_alias.rs index 68a7736d..f91b3056 100644 --- a/crates/ruma-client-api/src/r0/membership/join_room_by_id_or_alias.rs +++ b/crates/ruma-client-api/src/r0/membership/join_room_by_id_or_alias.rs @@ -33,7 +33,6 @@ ruma_api! { /// Optional reason for joining the room. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<&'a str>, } diff --git a/crates/ruma-client-api/src/r0/membership/leave_room.rs b/crates/ruma-client-api/src/r0/membership/leave_room.rs index feb7809e..de2f0545 100644 --- a/crates/ruma-client-api/src/r0/membership/leave_room.rs +++ b/crates/ruma-client-api/src/r0/membership/leave_room.rs @@ -20,7 +20,6 @@ ruma_api! { /// Optional reason to be included as the `reason` on the subsequent membership event. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<&'a str>, } diff --git a/crates/ruma-client-api/src/r0/membership/unban_user.rs b/crates/ruma-client-api/src/r0/membership/unban_user.rs index 34036acb..f71c11b0 100644 --- a/crates/ruma-client-api/src/r0/membership/unban_user.rs +++ b/crates/ruma-client-api/src/r0/membership/unban_user.rs @@ -23,7 +23,6 @@ ruma_api! { /// Optional reason for unbanning the user. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option<&'a str>, } diff --git a/crates/ruma-client-api/src/r0/profile/get_avatar_url.rs b/crates/ruma-client-api/src/r0/profile/get_avatar_url.rs index 14df9e7f..3ee20278 100644 --- a/crates/ruma-client-api/src/r0/profile/get_avatar_url.rs +++ b/crates/ruma-client-api/src/r0/profile/get_avatar_url.rs @@ -37,7 +37,6 @@ ruma_api! { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, diff --git a/crates/ruma-client-api/src/r0/profile/get_profile.rs b/crates/ruma-client-api/src/r0/profile/get_profile.rs index 56dfd96b..6d6d841d 100644 --- a/crates/ruma-client-api/src/r0/profile/get_profile.rs +++ b/crates/ruma-client-api/src/r0/profile/get_profile.rs @@ -41,7 +41,6 @@ ruma_api! { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, diff --git a/crates/ruma-client-api/src/r0/profile/set_avatar_url.rs b/crates/ruma-client-api/src/r0/profile/set_avatar_url.rs index 60f915f1..de742dee 100644 --- a/crates/ruma-client-api/src/r0/profile/set_avatar_url.rs +++ b/crates/ruma-client-api/src/r0/profile/set_avatar_url.rs @@ -43,7 +43,6 @@ ruma_api! { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option<&'a str>, diff --git a/crates/ruma-client-api/src/r0/session/get_login_types.rs b/crates/ruma-client-api/src/r0/session/get_login_types.rs index dd6c955e..1a77c6dd 100644 --- a/crates/ruma-client-api/src/r0/session/get_login_types.rs +++ b/crates/ruma-client-api/src/r0/session/get_login_types.rs @@ -151,7 +151,6 @@ pub struct SsoLoginType { /// This uses the unstable prefix in /// [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde( default, rename = "org.matrix.msc2858.identity_providers", @@ -169,7 +168,6 @@ impl SsoLoginType { /// An SSO login identity provider. #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[derive(Clone, Debug, Deserialize, Serialize)] pub struct IdentityProvider { @@ -199,7 +197,6 @@ impl IdentityProvider { /// This uses the unstable prefix in /// [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858). #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[derive(Clone, Debug, PartialEq, Eq, StringEnum)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub enum IdentityProviderBrand { diff --git a/crates/ruma-client-api/src/r0/session/sso_login_with_provider.rs b/crates/ruma-client-api/src/r0/session/sso_login_with_provider.rs index 4a88cc71..3f28232b 100644 --- a/crates/ruma-client-api/src/r0/session/sso_login_with_provider.rs +++ b/crates/ruma-client-api/src/r0/session/sso_login_with_provider.rs @@ -2,7 +2,6 @@ //! //! This uses the unstable prefix in [MSC2858](https://github.com/matrix-org/matrix-doc/pull/2858). #![cfg(feature = "unstable-pre-spec")] -#![cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] use ruma_api::ruma_api; diff --git a/crates/ruma-client-api/src/r0/sync/sync_events.rs b/crates/ruma-client-api/src/r0/sync/sync_events.rs index f13e7bee..002e2b3b 100644 --- a/crates/ruma-client-api/src/r0/sync/sync_events.rs +++ b/crates/ruma-client-api/src/r0/sync/sync_events.rs @@ -174,7 +174,6 @@ pub struct Rooms { /// The rooms that the user has knocked on. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub knock: BTreeMap, } @@ -274,7 +273,6 @@ impl JoinedRoom { /// Updates to knocked rooms. #[derive(Clone, Debug, Default, Deserialize, Serialize)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct KnockedRoom { /// The knock state. @@ -284,7 +282,6 @@ pub struct KnockedRoom { /// A mapping from a key `events` to a list of `StrippedStateEvent`. #[derive(Clone, Debug, Default, Deserialize, Serialize)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct KnockState { /// The list of events. diff --git a/crates/ruma-client-api/src/r0/uiaa.rs b/crates/ruma-client-api/src/r0/uiaa.rs index 56dbfe6c..92ce8b3e 100644 --- a/crates/ruma-client-api/src/r0/uiaa.rs +++ b/crates/ruma-client-api/src/r0/uiaa.rs @@ -57,7 +57,6 @@ pub enum AuthData<'a> { /// Registration token-based authentication (`org.matrix.msc3231.login.registration_token`). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] RegistrationToken(RegistrationToken<'a>), /// Fallback acknowledgement. @@ -377,7 +376,6 @@ pub enum AuthType { /// Registration token-based authentication (`org.matrix.msc3231.login.registration_token`). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[ruma_enum(rename = "org.matrix.msc3231.login.registration_token")] RegistrationToken, @@ -601,7 +599,6 @@ impl IncomingDummy { #[derive(Clone, Debug, Outgoing, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(tag = "type", rename = "org.matrix.msc3231.login.registration_token")] pub struct RegistrationToken<'a> { /// The registration token. @@ -612,7 +609,6 @@ pub struct RegistrationToken<'a> { } #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] impl<'a> RegistrationToken<'a> { /// Creates a new `RegistrationToken` with the given token. pub fn new(token: &'a str) -> Self { @@ -621,7 +617,6 @@ impl<'a> RegistrationToken<'a> { } #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] impl IncomingRegistrationToken { /// Convert from `IncomingRegistrationToken` to `RegistrationToken`. fn to_outgoing(&self) -> RegistrationToken<'_> { diff --git a/crates/ruma-client/src/lib.rs b/crates/ruma-client/src/lib.rs index 297e8d06..41a334ed 100644 --- a/crates/ruma-client/src/lib.rs +++ b/crates/ruma-client/src/lib.rs @@ -108,7 +108,6 @@ extern crate hyper_rustls_crate as hyper_rustls; extern crate isahc_crate as isahc; #[cfg(feature = "client-api")] -#[cfg_attr(docsrs, doc(cfg(feature = "client-api")))] mod client_api; mod error; pub mod http_client; diff --git a/crates/ruma-common/src/push/predefined.rs b/crates/ruma-common/src/push/predefined.rs index 6fde1883..37a74709 100644 --- a/crates/ruma-common/src/push/predefined.rs +++ b/crates/ruma-common/src/push/predefined.rs @@ -162,7 +162,6 @@ impl ConditionalPushRule { /// Matches emoji reactions to a message /// MSC2677: Annotations and Reactions #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub fn reaction() -> Self { Self { actions: vec![DontNotify], diff --git a/crates/ruma-events/src/enums.rs b/crates/ruma-events/src/enums.rs index 39a0ada2..4389e951 100644 --- a/crates/ruma-events/src/enums.rs +++ b/crates/ruma-events/src/enums.rs @@ -35,28 +35,20 @@ event_enum! { "m.call.hangup", "m.call.candidates", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.ready", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.start", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.cancel", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.accept", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.key", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.mac", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.done", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.reaction", "m.room.encrypted", "m.room.message", @@ -88,10 +80,8 @@ event_enum! { "m.room.tombstone", "m.room.topic", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.space.child", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.space.parent", } @@ -103,7 +93,6 @@ event_enum! { "m.forwarded_room_key", "m.key.verification.request", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.ready", "m.key.verification.start", "m.key.verification.cancel", @@ -111,14 +100,11 @@ event_enum! { "m.key.verification.key", "m.key.verification.mac", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.key.verification.done", "m.room.encrypted", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.secret.request", #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] "m.secret.send", } } diff --git a/crates/ruma-events/src/key/verification.rs b/crates/ruma-events/src/key/verification.rs index 3cfce2c1..c75582dc 100644 --- a/crates/ruma-events/src/key/verification.rs +++ b/crates/ruma-events/src/key/verification.rs @@ -13,12 +13,10 @@ use serde::{Deserialize, Serialize}; pub mod accept; pub mod cancel; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod done; pub mod key; pub mod mac; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod ready; pub mod request; pub mod start; @@ -123,7 +121,6 @@ impl ShortAuthenticationString { /// A relation which associates an `m.key.verification.request` with another key verification event. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "rel_type", rename = "m.reference")] pub struct Relation { diff --git a/crates/ruma-events/src/key/verification/accept.rs b/crates/ruma-events/src/key/verification/accept.rs index 59e02dc1..9877b5eb 100644 --- a/crates/ruma-events/src/key/verification/accept.rs +++ b/crates/ruma-events/src/key/verification/accept.rs @@ -43,7 +43,6 @@ impl ToDeviceKeyVerificationAcceptEventContent { #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[ruma_event(type = "m.key.verification.accept", kind = Message)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct KeyVerificationAcceptEventContent { /// The method specific content. diff --git a/crates/ruma-events/src/key/verification/cancel.rs b/crates/ruma-events/src/key/verification/cancel.rs index 7d9547cf..228831f8 100644 --- a/crates/ruma-events/src/key/verification/cancel.rs +++ b/crates/ruma-events/src/key/verification/cancel.rs @@ -39,7 +39,6 @@ impl ToDeviceKeyVerificationCancelEventContent { /// Cancels a key verification process/request. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[ruma_event(type = "m.key.verification.cancel", kind = Message)] pub struct KeyVerificationCancelEventContent { diff --git a/crates/ruma-events/src/key/verification/key.rs b/crates/ruma-events/src/key/verification/key.rs index 01813800..c9e3a0da 100644 --- a/crates/ruma-events/src/key/verification/key.rs +++ b/crates/ruma-events/src/key/verification/key.rs @@ -35,7 +35,6 @@ impl ToDeviceKeyVerificationKeyEventContent { /// Sends the ephemeral public key for a device to the partner device. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[ruma_event(type = "m.key.verification.key", kind = Message)] pub struct KeyVerificationKeyEventContent { diff --git a/crates/ruma-events/src/key/verification/mac.rs b/crates/ruma-events/src/key/verification/mac.rs index c9b147ad..e59be17a 100644 --- a/crates/ruma-events/src/key/verification/mac.rs +++ b/crates/ruma-events/src/key/verification/mac.rs @@ -43,7 +43,6 @@ impl ToDeviceKeyVerificationMacEventContent { /// Sends the MAC of a device's key to the partner device. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[ruma_event(type = "m.key.verification.mac", kind = Message)] pub struct KeyVerificationMacEventContent { diff --git a/crates/ruma-events/src/key/verification/start.rs b/crates/ruma-events/src/key/verification/start.rs index 3152e960..66036c3e 100644 --- a/crates/ruma-events/src/key/verification/start.rs +++ b/crates/ruma-events/src/key/verification/start.rs @@ -48,7 +48,6 @@ impl ToDeviceKeyVerificationStartEventContent { /// Begins an SAS key verification process. #[derive(Clone, Debug, Deserialize, Serialize, EventContent)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[ruma_event(type = "m.key.verification.start", kind = Message)] pub struct KeyVerificationStartEventContent { diff --git a/crates/ruma-events/src/lib.rs b/crates/ruma-events/src/lib.rs index 06d1e218..88a072ca 100644 --- a/crates/ruma-events/src/lib.rs +++ b/crates/ruma-events/src/lib.rs @@ -162,33 +162,27 @@ 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; pub mod push_rules; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod reaction; pub mod receipt; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod relation; pub mod room; pub mod room_key; pub mod room_key_request; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod secret; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod space; pub mod sticker; pub mod tag; pub mod typing; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub use self::relation::Relations; pub use self::{ enums::*, diff --git a/crates/ruma-events/src/pdu.rs b/crates/ruma-events/src/pdu.rs index 80c1f294..1c11f871 100644 --- a/crates/ruma-events/src/pdu.rs +++ b/crates/ruma-events/src/pdu.rs @@ -44,7 +44,6 @@ pub struct RoomV1Pdu { pub sender: UserId, #[cfg(not(feature = "unstable-pre-spec"))] - #[cfg_attr(docsrs, doc(cfg(not(feature = "unstable-pre-spec"))))] /// The `server_name` of the homeserver that created this event. pub origin: String, @@ -104,7 +103,6 @@ pub struct RoomV3Pdu { pub sender: UserId, #[cfg(not(feature = "unstable-pre-spec"))] - #[cfg_attr(docsrs, doc(cfg(not(feature = "unstable-pre-spec"))))] /// The `server_name` of the homeserver that created this event. pub origin: String, diff --git a/crates/ruma-events/src/room.rs b/crates/ruma-events/src/room.rs index 6e0bbe99..bc05362f 100644 --- a/crates/ruma-events/src/room.rs +++ b/crates/ruma-events/src/room.rs @@ -65,7 +65,6 @@ pub struct ImageInfo { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, diff --git a/crates/ruma-events/src/room/avatar.rs b/crates/ruma-events/src/room/avatar.rs index 1a73dc68..1bce5da9 100644 --- a/crates/ruma-events/src/room/avatar.rs +++ b/crates/ruma-events/src/room/avatar.rs @@ -85,7 +85,6 @@ pub struct ImageInfo { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, diff --git a/crates/ruma-events/src/room/encrypted.rs b/crates/ruma-events/src/room/encrypted.rs index 140ecba3..8253eba3 100644 --- a/crates/ruma-events/src/room/encrypted.rs +++ b/crates/ruma-events/src/room/encrypted.rs @@ -96,17 +96,14 @@ pub enum Relation { /// An event that replaces another event. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] Replacement(Replacement), /// A reference to another event. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] Reference(Reference), /// An annotation to an event. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] Annotation(Annotation), #[doc(hidden)] @@ -119,7 +116,6 @@ pub enum Relation { /// is part of the encrypted content of an `m.room.encrypted` events. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct Replacement { /// The ID of the event being replacing. @@ -129,7 +125,6 @@ pub struct Replacement { /// A reference to another event. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct Reference { /// The event we are referencing. @@ -147,7 +142,6 @@ impl Reference { /// An annotation for an event. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct Annotation { /// The event that is being annotated. diff --git a/crates/ruma-events/src/room/member.rs b/crates/ruma-events/src/room/member.rs index b406791c..220fea81 100644 --- a/crates/ruma-events/src/room/member.rs +++ b/crates/ruma-events/src/room/member.rs @@ -74,7 +74,6 @@ pub struct RoomMemberEventContent { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, @@ -90,7 +89,6 @@ pub struct RoomMemberEventContent { /// the potential for spam and abuse. Hiding the reason behind a button or other component /// is recommended. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(skip_serializing_if = "Option::is_none")] pub reason: Option, } diff --git a/crates/ruma-events/src/room/message.rs b/crates/ruma-events/src/room/message.rs index a3df7776..846a8af1 100644 --- a/crates/ruma-events/src/room/message.rs +++ b/crates/ruma-events/src/room/message.rs @@ -173,7 +173,6 @@ pub enum MessageType { /// A request to initiate a key verification. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] VerificationRequest(KeyVerificationRequestEventContent), /// A custom message. @@ -311,7 +310,6 @@ pub enum Relation { /// An event that replaces another event. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] Replacement(Replacement), #[doc(hidden)] @@ -336,7 +334,6 @@ impl InReplyTo { /// The event this relation belongs to replaces another event. #[derive(Clone, Debug)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct Replacement { /// The ID of the event being replacing. @@ -446,7 +443,6 @@ impl EmoteMessageEventContent { /// Returns an html emote message if some markdown formatting was detected, otherwise returns a /// plain-text emote. #[cfg(feature = "markdown")] - #[cfg_attr(docsrs, doc(cfg(feature = "markdown")))] pub fn markdown(body: impl AsRef + Into) -> Self { Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) } } @@ -652,7 +648,6 @@ impl NoticeMessageEventContent { /// Returns an html notice if some markdown formatting was detected, otherwise returns a plain /// text notice. #[cfg(feature = "markdown")] - #[cfg_attr(docsrs, doc(cfg(feature = "markdown")))] pub fn markdown(body: impl AsRef + Into) -> Self { Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) } } @@ -781,7 +776,6 @@ impl FormattedBody { /// /// Returns `None` if no markdown formatting was found. #[cfg(feature = "markdown")] - #[cfg_attr(docsrs, doc(cfg(feature = "markdown")))] pub fn markdown(body: impl AsRef) -> Option { let body = body.as_ref(); let mut html_body = String::new(); @@ -821,7 +815,6 @@ impl TextMessageEventContent { /// Returns an html message if some markdown formatting was detected, otherwise returns a plain /// text message. #[cfg(feature = "markdown")] - #[cfg_attr(docsrs, doc(cfg(feature = "markdown")))] pub fn markdown(body: impl AsRef + Into) -> Self { Self { formatted: FormattedBody::markdown(&body), ..Self::plain(body) } } @@ -912,7 +905,6 @@ pub struct VideoInfo { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, @@ -928,7 +920,6 @@ impl VideoInfo { /// The payload for a key verification request message. #[derive(Clone, Debug, Deserialize, Serialize)] #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "msgtype", rename = "m.key.verification.request")] pub struct KeyVerificationRequestEventContent { diff --git a/crates/ruma-events/src/unsigned.rs b/crates/ruma-events/src/unsigned.rs index a815990f..4de9872b 100644 --- a/crates/ruma-events/src/unsigned.rs +++ b/crates/ruma-events/src/unsigned.rs @@ -24,7 +24,6 @@ pub struct Unsigned { /// Server-compiled information from other events relating to this event. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "m.relations", skip_serializing_if = "Option::is_none")] pub relations: Option, } @@ -86,7 +85,6 @@ pub struct UnsignedWithPrevContent { transaction_id: Option, #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "m.relations", skip_serializing_if = "Option::is_none")] relations: Option, diff --git a/crates/ruma-federation-api/src/keys/get_keys/v1.rs b/crates/ruma-federation-api/src/keys/get_keys/v1.rs index 3a830958..f3a51fcc 100644 --- a/crates/ruma-federation-api/src/keys/get_keys/v1.rs +++ b/crates/ruma-federation-api/src/keys/get_keys/v1.rs @@ -31,13 +31,11 @@ ruma_api! { /// Information on the master cross-signing keys of the queried users. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub master_keys: BTreeMap, /// Information on the self-signing keys of the queried users. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] pub self_signing_keys: BTreeMap, } diff --git a/crates/ruma-federation-api/src/lib.rs b/crates/ruma-federation-api/src/lib.rs index 0679ca2f..86b12d24 100644 --- a/crates/ruma-federation-api/src/lib.rs +++ b/crates/ruma-federation-api/src/lib.rs @@ -18,7 +18,6 @@ pub mod discovery; pub mod event; pub mod keys; #[cfg(feature = "unstable-pre-spec")] -#[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] pub mod knock; pub mod membership; pub mod openid; diff --git a/crates/ruma-federation-api/src/membership/create_join_event.rs b/crates/ruma-federation-api/src/membership/create_join_event.rs index 9cd47356..3602ec11 100644 --- a/crates/ruma-federation-api/src/membership/create_join_event.rs +++ b/crates/ruma-federation-api/src/membership/create_join_event.rs @@ -11,7 +11,6 @@ use serde_json::value::RawValue as RawJsonValue; #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct RoomState { #[cfg(not(feature = "unstable-pre-spec"))] - #[cfg_attr(docsrs, doc(cfg(not(feature = "unstable-pre-spec"))))] /// The resident server's DNS name. pub origin: String, diff --git a/crates/ruma-federation-api/src/query/get_profile_information/v1.rs b/crates/ruma-federation-api/src/query/get_profile_information/v1.rs index f8f8eb73..d67a989a 100644 --- a/crates/ruma-federation-api/src/query/get_profile_information/v1.rs +++ b/crates/ruma-federation-api/src/query/get_profile_information/v1.rs @@ -47,7 +47,6 @@ ruma_api! { /// This uses the unstable prefix in /// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448). #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] #[serde(rename = "xyz.amorgan.blurhash")] #[serde(skip_serializing_if = "Option::is_none")] pub blurhash: Option, diff --git a/crates/ruma-identifiers/src/device_id.rs b/crates/ruma-identifiers/src/device_id.rs index 80b673fa..4aa1a037 100644 --- a/crates/ruma-identifiers/src/device_id.rs +++ b/crates/ruma-identifiers/src/device_id.rs @@ -12,7 +12,6 @@ opaque_identifier! { impl DeviceId { /// Generates a random `DeviceId`, suitable for assignment to a new device. #[cfg(feature = "rand")] - #[cfg_attr(docsrs, doc(cfg(feature = "rand")))] pub fn new() -> Box { Self::from_owned(generate_localpart(8)) } diff --git a/crates/ruma-identifiers/src/event_id.rs b/crates/ruma-identifiers/src/event_id.rs index 140b85f7..9f27a64a 100644 --- a/crates/ruma-identifiers/src/event_id.rs +++ b/crates/ruma-identifiers/src/event_id.rs @@ -57,7 +57,6 @@ impl EventId { /// Does not currently ever fail, but may fail in the future if the homeserver cannot be parsed /// parsed as a valid host. #[cfg(feature = "rand")] - #[cfg_attr(docsrs, doc(cfg(feature = "rand")))] pub fn new(server_name: &ServerName) -> Self { use crate::generate_localpart; diff --git a/crates/ruma-identifiers/src/room_id.rs b/crates/ruma-identifiers/src/room_id.rs index e634e388..fe28ffce 100644 --- a/crates/ruma-identifiers/src/room_id.rs +++ b/crates/ruma-identifiers/src/room_id.rs @@ -35,7 +35,6 @@ impl RoomId { /// /// Fails if the given homeserver cannot be parsed as a valid host. #[cfg(feature = "rand")] - #[cfg_attr(docsrs, doc(cfg(feature = "rand")))] pub fn new(server_name: &ServerName) -> Self { use crate::generate_localpart; diff --git a/crates/ruma-identifiers/src/room_id_or_room_alias_id.rs b/crates/ruma-identifiers/src/room_id_or_room_alias_id.rs index 2ee6fa05..7df9a762 100644 --- a/crates/ruma-identifiers/src/room_id_or_room_alias_id.rs +++ b/crates/ruma-identifiers/src/room_id_or_room_alias_id.rs @@ -63,7 +63,6 @@ impl RoomIdOrAliasId { /// Turn this `RoomIdOrAliasId` into `Either` #[cfg(feature = "either")] - #[cfg_attr(docsrs, doc(cfg(feature = "either")))] pub fn into_either(self) -> either::Either { match self.variant() { Variant::RoomId => { diff --git a/crates/ruma-identifiers/src/room_version_id.rs b/crates/ruma-identifiers/src/room_version_id.rs index 40e4270e..31f95753 100644 --- a/crates/ruma-identifiers/src/room_version_id.rs +++ b/crates/ruma-identifiers/src/room_version_id.rs @@ -44,17 +44,14 @@ pub enum RoomVersionId { /// A version 7 room. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] Version7, /// A version 8 room. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] Version8, /// A version 9 room. #[cfg(feature = "unstable-pre-spec")] - #[cfg_attr(docsrs, doc(cfg(feature = "unstable-pre-spec")))] Version9, #[doc(hidden)] diff --git a/crates/ruma-identifiers/src/user_id.rs b/crates/ruma-identifiers/src/user_id.rs index d118aaad..22a72d3f 100644 --- a/crates/ruma-identifiers/src/user_id.rs +++ b/crates/ruma-identifiers/src/user_id.rs @@ -40,7 +40,6 @@ impl UserId { /// Attempts to generate a `UserId` for the given origin server with a localpart consisting of /// 12 random ASCII characters. #[cfg(feature = "rand")] - #[cfg_attr(docsrs, doc(cfg(feature = "rand")))] pub fn new(server_name: &ServerName) -> Self { use crate::generate_localpart; diff --git a/crates/ruma/src/lib.rs b/crates/ruma/src/lib.rs index 0b6e6489..89dfd6c8 100644 --- a/crates/ruma/src/lib.rs +++ b/crates/ruma/src/lib.rs @@ -92,19 +92,15 @@ pub use ruma_identifiers::{ }; #[cfg(feature = "client")] -#[cfg_attr(docsrs, doc(cfg(feature = "client")))] #[doc(inline)] pub use ruma_client as client; #[cfg(feature = "events")] -#[cfg_attr(docsrs, doc(cfg(feature = "events")))] #[doc(inline)] pub use ruma_events as events; #[cfg(feature = "signatures")] -#[cfg_attr(docsrs, doc(cfg(feature = "signatures")))] #[doc(inline)] pub use ruma_signatures as signatures; #[cfg(feature = "state-res")] -#[cfg_attr(docsrs, doc(cfg(feature = "state-res")))] #[doc(inline)] pub use ruma_state_res as state_res; @@ -113,7 +109,6 @@ pub use ruma_state_res as state_res; /// /// [apis]: https://matrix.org/docs/spec/#matrix-apis #[cfg(feature = "api")] -#[cfg_attr(docsrs, doc(cfg(feature = "api")))] pub mod api { pub use ruma_api::*;