Private Rustdoc: the eight unresolved or redundant intra-doc links resolve

What: `cargo doc --document-private-items` under -D warnings reported eight diagnostics on
development (306d357141's tree, lint job m3-max-65851). CI's private intra-doc links step holds
each crate at 0. Each is fixed where it stands:
- metal2vulkan:
  - lower/arith/libm/mod.rs: Lib::instructions is #[cfg(test)], so the doc names it in code.
  - lower/dispatch.rs: arena_slot links KernelDecl::arena_slot, the method it means.
  - lower/fragment/fetch.rs: the link to extended_range::Blend::packed16, which no longer exists,
    goes.
  - lower/mesh/mod.rs: builtins links the BUILTINS constant.
  - lower/stage_io/plan.rs: the quoted [[render_target_array_index]] is code, not a link.
- metal2vulkan-runtime:
  - stage.rs: TEST_BOUND exists only under the device-test cfgs, so the doc names it in code.
  - device.rs: Error::StageUnfilled's explicit target was redundant, since Error is in scope.
- metal2vulkan-conformance: cases/shared_creator_formats.rs: Failure::of links
  Failure::of_rt, our side's constructor.

Why: the class of the bug row "rt private rustdoc: 3 redundant explicit links"; main's word to fix
all eight in one commit.

Verified: comments only. The compile job, with each crate's private Rustdoc -D warnings, is named
in the report.
This commit is contained in:
Anees Iqbal committed 2026-11-21 21:16:06 -08:00
1 parent 87a39975fa
commit 58f2ab2f2b
8 files changed
+8 -8

No files matched your search

@@ -202,7 +202,7 @@ mod site {
const METAL_NIL: &str = "Nil";
/// The variant name **our** side records a typed `Error::Nil` under
/// ([`crate::case::Failure::of`]).
/// ([`crate::case::Failure::of_rt`]).
const OUR_NIL: &str = "Error::Nil";
/// One case of the family: a table of descriptors, each asked of the shared creator.
+1 -1
View File
@@ -459,7 +459,7 @@ pub struct DeviceOptions {
/// the consumer's helper that the runtime only stores with a memory breach
/// ([`StageBreach::Memory`](crate::StageBreach::Memory)) and compares at a make; the runtime
/// takes no other path by it, on any device. At the make, a memory breach kept under a lower
/// ceiling is a miss ([`Error::StageUnfilled`](crate::Error::StageUnfilled)), so the helper is
/// ceiling is a miss ([`Error::StageUnfilled`]), so the helper is
/// asked again under this one; one kept under this ceiling or a higher one refuses. A memory
/// breach entry that holds no ceiling counts as kept under 0, the default, so on a device
/// given 0 every memory breach refuses.
+1 -1
View File
@@ -182,7 +182,7 @@ pub(crate) struct Heavy {
}
/// The entry weight past which a stage is compiled only in the consumer's helper: the translator's
/// `COMPILED_STAGE_WEIGHT`, or, in a device test, one the test sets ([`TEST_BOUND`]), so a small
/// `COMPILED_STAGE_WEIGHT`, or, in a device test, one the test sets (`TEST_BOUND`), so a small
/// kernel passes it.
pub(crate) fn bound() -> u64 {
#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]
@@ -297,7 +297,7 @@ impl Lib {
}
/// Metal's precise `fmod` of `x` and `y` (`float` lanes of form `f`) by its routine, one call
/// per lane; `None` where the module defines no routine ([`Lib::instructions`]).
/// per lane; `None` where the module defines no routine (a unit test's `Lib::instructions`).
pub fn fmod(
&self,
fb: &mut FunctionBuilder<'_>,
+1 -1
View File
@@ -537,7 +537,7 @@ pub struct DispatchPlan {
/// `SpecKey::DeepThreadgroup`, under which its threadgroup runs as one row (the module docs).
pub deep: bool,
/// A kernel whose private arena lives in device memory (`memory::plan::ArenaLayout::device`):
/// each invocation reaches its slot by its index in its dispatch ([`arena_slot`]).
/// each invocation reaches its slot by its index in its dispatch ([`KernelDecl::arena_slot`]).
pub private_arena: bool,
}
@@ -129,7 +129,7 @@ pub(crate) fn unorm8_format(pf: crate::metal::PixelFormat) -> bool {
}
/// Whether `pf` is a packed 16-bit unorm format (`metal::format::WordAttachment::Packed16`), whose
/// blend Metal computes in `half` over its decoded codes ([`extended_range::Blend::packed16`]).
/// blend Metal computes in `half` over its decoded codes.
pub(crate) fn packed16_format(pf: crate::metal::PixelFormat) -> bool {
matches!(
WordAttachment::layout(pf),
+1 -1
View File
@@ -1313,7 +1313,7 @@ pub const BUILTINS: [KernelBuiltin; 2] = [
KernelBuiltin::ThreadsPerThreadgroup,
];
/// Whether the entry has a wrapper that reads [`builtins`].
/// Whether the entry has a wrapper that reads [`BUILTINS`].
pub fn wraps(plan: &MeshPlan) -> bool {
plan.object || plan.mesh.is_some()
}
@@ -1418,7 +1418,7 @@ enum IndexStore {
/// device.
///
/// An index not shown alike is refused because Metal gives it no answer to match: "You must
/// return the same value of [[render_target_array_index]] for every vertex in a primitive. If
/// return the same value of `[[render_target_array_index]]` for every vertex in a primitive. If
/// values differ, the behavior and value passed to the fragment function are undefined." (the
/// Metal Shading Language specification, and the same of `[[viewport_array_index]]`). It is not
/// stored to its builtin as written because Vulkan asks a stage that writes `Layer` to "write the