diff --git a/src/bot/download.rs b/src/bot/download.rs index 91e5b692..0dec6543 100644 --- a/src/bot/download.rs +++ b/src/bot/download.rs @@ -56,7 +56,8 @@ impl Bot { /// [`tokio::fs::File`]: tokio::fs::File /// [`Bot::download_file`]: crate::Bot::download_file #[cfg(feature = "unstable-stream")] - #[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "unstable-stream")))] + // FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> + #[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "unstable-stream")))] pub async fn download_file_stream( &self, path: &str, diff --git a/src/dispatching/dialogue/mod.rs b/src/dispatching/dialogue/mod.rs index 255b3678..883e6c8f 100644 --- a/src/dispatching/dialogue/mod.rs +++ b/src/dispatching/dialogue/mod.rs @@ -158,11 +158,13 @@ pub use transition::{ }; #[cfg(feature = "macros")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] pub use teloxide_macros::Transition; #[cfg(feature = "redis-storage")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "redis-storage")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "redis-storage")))] pub use storage::{RedisStorage, RedisStorageError}; pub use storage::{serializer, InMemStorage, Serializer, Storage}; diff --git a/src/dispatching/dialogue/storage/mod.rs b/src/dispatching/dialogue/storage/mod.rs index 2c2d943d..ab8181cf 100644 --- a/src/dispatching/dialogue/storage/mod.rs +++ b/src/dispatching/dialogue/storage/mod.rs @@ -9,7 +9,8 @@ use futures::future::BoxFuture; pub use in_mem_storage::InMemStorage; #[cfg(feature = "redis-storage")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "redis-storage")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "redis-storage")))] pub use redis_storage::{RedisStorage, RedisStorageError}; pub use serializer::Serializer; use std::sync::Arc; diff --git a/src/dispatching/dialogue/storage/serializer.rs b/src/dispatching/dialogue/storage/serializer.rs index 7154c01b..16ce266a 100644 --- a/src/dispatching/dialogue/storage/serializer.rs +++ b/src/dispatching/dialogue/storage/serializer.rs @@ -32,11 +32,13 @@ where /// /// [CBOR]: https://en.wikipedia.org/wiki/CBOR #[cfg(feature = "cbor-serializer")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "cbor-serializer")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "cbor-serializer")))] pub struct CBOR; #[cfg(feature = "cbor-serializer")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "cbor-serializer")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "cbor-serializer")))] impl<D> Serializer<D> for CBOR where D: Serialize + DeserializeOwned, @@ -56,11 +58,13 @@ where /// /// [Bincode]: https://github.com/servo/bincode #[cfg(feature = "bincode-serializer")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "bincode-serializer")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "bincode-serializer")))] pub struct Bincode; #[cfg(feature = "bincode-serializer")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "bincode-serializer")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "bincode-serializer")))] impl<D> Serializer<D> for Bincode where D: Serialize + DeserializeOwned, diff --git a/src/lib.rs b/src/lib.rs index 3e788bfb..8639abd6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -45,9 +45,11 @@ // // To properly build docs of this crate run // ```console -// $ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --open --all-features +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +// $ RUSTDOCFLAGS="--cfg teloxide_docsrs" cargo +nightly doc --open --all-features // ``` -#![cfg_attr(all(docsrs, feature = "nightly"), feature(doc_cfg))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#![cfg_attr(all(teloxide_docsrs, feature = "nightly"), feature(doc_cfg))] pub use bot::{Bot, BotBuilder}; pub use dispatching::repls::{ @@ -69,7 +71,8 @@ pub mod types; pub mod utils; #[cfg(feature = "macros")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] pub use teloxide_macros::teloxide; #[cfg(all(feature = "nightly", doctest))] diff --git a/src/net/download.rs b/src/net/download.rs index 091e799c..6f9c87b0 100644 --- a/src/net/download.rs +++ b/src/net/download.rs @@ -28,7 +28,8 @@ where } #[cfg(feature = "unstable-stream")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "unstable-stream")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "unstable-stream")))] pub async fn download_file_stream( client: &Client, token: &str, diff --git a/src/net/mod.rs b/src/net/mod.rs index ad02bcf1..118b6036 100644 --- a/src/net/mod.rs +++ b/src/net/mod.rs @@ -1,5 +1,6 @@ #[cfg(feature = "unstable-stream")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "unstable-stream")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "unstable-stream")))] pub use download::download_file_stream; pub use self::{ diff --git a/src/prelude.rs b/src/prelude.rs index 92dab5b7..61773b4e 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -15,7 +15,8 @@ pub use crate::{ }; #[cfg(feature = "frunk")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "frunk")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "frunk")))] pub use crate::utils::UpState; pub use tokio::sync::mpsc::UnboundedReceiver; diff --git a/src/utils/command.rs b/src/utils/command.rs index a2bd4c22..5e9c034d 100644 --- a/src/utils/command.rs +++ b/src/utils/command.rs @@ -50,7 +50,8 @@ use serde::export::Formatter; use std::{error::Error, fmt::Display}; #[cfg(feature = "macros")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "macros")))] pub use teloxide_macros::BotCommand; /// An enumeration of bot's commands. diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 9bdedba9..e20a7a81 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -9,5 +9,6 @@ mod up_state; pub use client_from_env::client_from_env; #[cfg(feature = "frunk")] -#[cfg_attr(all(docsrs, feature = "nightly"), doc(cfg(feature = "frunk")))] +// FIXME(waffle): use `docsrs` here when issue with combine is resolved <https://github.com/teloxide/teloxide/pull/305#issuecomment-716172103> +#[cfg_attr(all(teloxide_docsrs, feature = "nightly"), doc(cfg(feature = "frunk")))] pub use up_state::UpState;