From d6e386df2d5446d55d27cc8bcc73660352077ed6 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Mon, 12 Jul 2021 23:15:47 -0400 Subject: [PATCH] Check docs in CI --- .github/workflows/ci.yml | 8 ++++++++ wgpu/src/util/mod.rs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24cfaf6633..f799054378 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,7 @@ jobs: env: PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work RUSTFLAGS: --cfg=web_sys_unstable_apis + RUSTDOCFLAGS: -Dwarnings steps: - name: checkout repo @@ -118,6 +119,9 @@ jobs: run: | cargo clippy --target ${{ matrix.target }} -p wgpu -- -D warnings + # build docs + cargo doc --target ${{ matrix.target }} -p wgpu --no-deps + - name: check native stable (fatal warnings) if: (matrix.kind == 'compile' || matrix.kind == 'test') && matrix.channel == 'stable' run: | @@ -128,6 +132,10 @@ jobs: # explicitly don't mention wgpu-hal so that --all-features don't apply to it cargo clippy --target ${{ matrix.target }} -p wgpu -p wgpu-core -p wgpu-info -p player --examples --tests --all-features -- -D warnings + # build docs + cargo doc --target ${{ matrix.target }} --no-deps + cargo doc --target ${{ matrix.target }} -p wgpu -p wgpu-core -p wgpu-info -p player --all-features --no-deps + - name: check native nightly (non-fatal warnings) if: (matrix.kind == 'compile' || matrix.kind == 'test') && matrix.channel != 'stable' run: | diff --git a/wgpu/src/util/mod.rs b/wgpu/src/util/mod.rs index 2b0903a49b..f0a115a7c2 100644 --- a/wgpu/src/util/mod.rs +++ b/wgpu/src/util/mod.rs @@ -34,7 +34,7 @@ pub fn make_spirv(data: &[u8]) -> super::ShaderSource { super::ShaderSource::SpirV(make_spirv_raw(data)) } -/// Version of [`make_spirv`] intended for use with [`Device::create_shader_module_spirv`]. +/// Version of make_spirv intended for use with [`Device::create_shader_module_spirv`]. /// Returns raw slice instead of ShaderSource. /// /// [`Device::create_shader_module_spirv`]: crate::Device::create_shader_module_spirv