Skip to content

Commit 595f93a

Browse files
committed
ci: Build-test documentation with warnings disallowed
Broken links that snuck in while the CI was not testing the documentation have also been corrected, to allow the CI to succeed again (and to have proper docs in the first place).
1 parent cebfd54 commit 595f93a

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,21 @@ jobs:
111111
with:
112112
command: clippy
113113
args: --workspace --all-targets -- -D warnings
114+
115+
docs:
116+
name: Build-test docs
117+
runs-on: ubuntu-latest
118+
steps:
119+
- uses: actions/checkout@v2
120+
- uses: actions-rs/toolchain@v1
121+
with:
122+
profile: minimal
123+
toolchain: stable
124+
override: true
125+
- uses: actions-rs/cargo@v1
126+
name: Document all crates
127+
env:
128+
RUSTDOCFLAGS: -Dwarnings
129+
with:
130+
command: doc
131+
args: --all --all-features --no-deps --document-private-items

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased] - ReleaseDate
88

9+
### Changed
10+
11+
- Fixed broken (intradoc) links in the prelude and `VK_KHR_get_surface_capabilities2` extension (#559)
12+
913
## [0.35.1] - 2022-01-18
1014

1115
### Added

ash/src/extensions/khr/get_surface_capabilities2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl GetSurfaceCapabilities2 {
1717
Self { fp }
1818
}
1919

20-
#[doc = "https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSurfaceCapabilities2KHR.html"]
20+
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSurfaceCapabilities2KHR.html>"]
2121
pub unsafe fn get_physical_device_surface_capabilities2(
2222
&self,
2323
physical_device: vk::PhysicalDevice,
@@ -49,7 +49,7 @@ impl GetSurfaceCapabilities2 {
4949
err_code.result_with_success(count as usize)
5050
}
5151

52-
#[doc = "https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSurfaceFormats2KHR.html"]
52+
#[doc = "<https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/vkGetPhysicalDeviceSurfaceFormats2KHR.html>"]
5353
///
5454
/// Call [`Self::get_physical_device_surface_formats2_len()`] to query the number of elements to pass to `out`.
5555
/// Be sure to [`Default::default()`]-initialize these elements and optionally set their `p_next` pointer.

ash/src/vk/prelude.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
use crate::vk;
2+
13
/// Holds 24 bits in the least significant bits of memory,
24
/// and 8 bytes in the most significant bits of that memory,
35
/// occupying a single [`u32`] in total. This is commonly used in
46
/// [acceleration structure instances] such as
5-
/// [`vk::AccelerationStructureInstanceKHR`][super::AccelerationStructureInstanceKHR],
6-
/// [`vk::AccelerationStructureSRTMotionInstanceNV`][super::AccelerationStructureSRTMotionInstanceNV] and
7-
/// [`vk::AccelerationStructureMatrixMotionInstanceNV`][super::AccelerationStructureMatrixMotionInstanceNV].
7+
/// [`vk::AccelerationStructureInstanceKHR`],
8+
/// [`vk::AccelerationStructureSRTMotionInstanceNV`] and
9+
/// [`vk::AccelerationStructureMatrixMotionInstanceNV`].
810
///
911
/// [acceleration structure instances]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkAccelerationStructureInstanceKHR.html#_description
1012
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
@@ -27,7 +29,11 @@ impl Packed24_8 {
2729
}
2830
}
2931

30-
impl super::ColorComponentFlags {
32+
// Intradoc `Self::` links refuse to resolve if `ColorComponentFlags`
33+
// isn't directly in scope: https://github.com/rust-lang/rust/issues/93205
34+
use vk::ColorComponentFlags;
35+
36+
impl ColorComponentFlags {
3137
/// Contraction of [`Self::R`] | [`Self::G`] | [`Self::B`] | [`Self::A`]
3238
pub const RGBA: Self = Self(Self::R.0 | Self::G.0 | Self::B.0 | Self::A.0);
3339
}

0 commit comments

Comments
 (0)