From 5198f8e3e44ef512295db1394d377b75bafe7e3c Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 4 Apr 2020 02:14:02 +0100 Subject: [PATCH] document wgpu feature flags --- wgpu/src/lib.rs | 2 ++ wgpu/src/widget.rs | 1 + wgpu/src/widget/canvas/frame.rs | 1 + 3 files changed, 4 insertions(+) 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;