diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index f00c7d2c..799c1f34 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -25,6 +25,8 @@ #![deny(unused_results)] #![forbid(unsafe_code)] #![forbid(rust_2018_idioms)] +#![cfg_attr(docsrs, feature(doc_cfg))] + pub mod defaults; pub mod settings; pub mod triangle; diff --git a/wgpu/src/widget.rs b/wgpu/src/widget.rs index b39f2d91..c3a47dff 100644 --- a/wgpu/src/widget.rs +++ b/wgpu/src/widget.rs @@ -37,6 +37,7 @@ pub use slider::Slider; pub use text_input::TextInput; #[cfg(feature = "canvas")] +#[cfg_attr(docsrs, doc(cfg(feature = "canvas")))] pub mod canvas; #[cfg(feature = "canvas")] diff --git a/wgpu/src/widget/canvas/frame.rs b/wgpu/src/widget/canvas/frame.rs index 7d7ce06a..df1d7df5 100644 --- a/wgpu/src/widget/canvas/frame.rs +++ b/wgpu/src/widget/canvas/frame.rs @@ -172,6 +172,7 @@ impl Frame { /// /// [`Text`]: struct.Text.html /// [`Frame`]: struct.Frame.html + /// [`Canvas`]: struct.Canvas.html pub fn fill_text(&mut self, text: Text) { use std::f32;