Check docs in CI

This commit is contained in:
Connor Fitzgerald 2021-07-12 23:15:47 -04:00
parent 4b4e393eec
commit d6e386df2d
2 changed files with 9 additions and 1 deletions

View File

@ -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: |

View File

@ -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