From cf434236e7e15e0fa05e5915b8d4d78dcaf1b7e8 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 11 May 2023 17:28:51 +0200 Subject: Enable `doc_auto_cfg` when generating documentation --- widget/src/helpers.rs | 3 --- widget/src/lib.rs | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'widget/src') diff --git a/widget/src/helpers.rs b/widget/src/helpers.rs index 336ac4ee..3f5136f8 100644 --- a/widget/src/helpers.rs +++ b/widget/src/helpers.rs @@ -310,7 +310,6 @@ where /// /// [`Image`]: widget::Image #[cfg(feature = "image")] -#[cfg_attr(docsrs, doc(cfg(feature = "image")))] pub fn image(handle: impl Into) -> crate::Image { crate::Image::new(handle.into()) } @@ -320,7 +319,6 @@ pub fn image(handle: impl Into) -> crate::Image { /// [`Svg`]: widget::Svg /// [`Handle`]: widget::svg::Handle #[cfg(feature = "svg")] -#[cfg_attr(docsrs, doc(cfg(feature = "svg")))] pub fn svg( handle: impl Into, ) -> crate::Svg @@ -333,7 +331,6 @@ where /// Creates a new [`Canvas`]. #[cfg(feature = "canvas")] -#[cfg_attr(docsrs, doc(cfg(feature = "canvas")))] pub fn canvas( program: P, ) -> crate::Canvas diff --git a/widget/src/lib.rs b/widget/src/lib.rs index ab1ab95b..9da13f9b 100644 --- a/widget/src/lib.rs +++ b/widget/src/lib.rs @@ -14,6 +14,7 @@ )] #![forbid(unsafe_code, rust_2018_idioms)] #![allow(clippy::inherent_to_string, clippy::type_complexity)] +#![cfg_attr(docsrs, feature(doc_auto_cfg))] pub use iced_renderer as renderer; pub use iced_renderer::graphics; pub use iced_runtime as runtime; -- cgit