From 15bc2e5cfaffb040ed2bc127ed3469c29aef3cfd Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 20 Nov 2026 06:18:55 -0800 Subject: [PATCH] rt docs: links whose label already names their target lose the explicit target; surface.rs's step macro names the test-only steps module in plain code rt's private Rustdoc (--document-private-items, -D warnings), whose CI ceiling is 0, failed on 13 redundant explicit link targets in block.rs, export.rs and import.rs and on surface.rs's link to the steps module, which exists only in device-test builds (m3-max-58617 at d19a5d3390). Docs only; checked by the job named in the hand-off. --- crates/metal2vulkan-rt/src/block.rs | 2 +- crates/metal2vulkan-rt/src/export.rs | 6 +++--- crates/metal2vulkan-rt/src/import.rs | 20 ++++++++++---------- crates/metal2vulkan-rt/src/surface.rs | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/crates/metal2vulkan-rt/src/block.rs b/crates/metal2vulkan-rt/src/block.rs index 15fcf9f5a..0ac77ecac 100644 --- a/crates/metal2vulkan-rt/src/block.rs +++ b/crates/metal2vulkan-rt/src/block.rs @@ -23,7 +23,7 @@ use std::sync::{Arc, Mutex, PoisonError, Weak}; /// an exported block's memory is freed. /// While a handle lives, the block's number names it to /// [`Device::new_buffer`](crate::Device::new_buffer) and the other calls that take one; once the -/// last is gone, they answer [`Error::NoSuchBlock`](crate::Error::NoSuchBlock). The device's +/// last is gone, they answer [`Error::NoSuchBlock`]. The device's /// teardown frees every allocation, blocks still claimed included, each after the consumer's /// [`BlockMappings::unmap`](crate::BlockMappings::unmap) of it returned; a handle dropped after /// that does nothing. diff --git a/crates/metal2vulkan-rt/src/export.rs b/crates/metal2vulkan-rt/src/export.rs index 20ef372ec..4117e36dc 100644 --- a/crates/metal2vulkan-rt/src/export.rs +++ b/crates/metal2vulkan-rt/src/export.rs @@ -207,9 +207,9 @@ impl Device { /// Err: [`Limit::NoExport`] where the device does not export the handle; /// [`Limit::ExportType`] for a dma-buf on a device without the foreign queue family, or where /// the buffer's memory requirements do not list the Private type; - /// [`Limit::BlockLen`](crate::Limit::BlockLen) past the device's longest allocation or - /// buffer; [`Limit::MemoryAllocations`](crate::Limit::MemoryAllocations); - /// [`Limit::BlockIds`](crate::Limit::BlockIds); [`Error::Vulkan`] where the buffer, the + /// [`Limit::BlockLen`] past the device's longest allocation or + /// buffer; [`Limit::MemoryAllocations`]; + /// [`Limit::BlockIds`]; [`Error::Vulkan`] where the buffer, the /// allocation, its binding or the handle fails; [`Error::Quiesced`]. pub fn new_exported_block( &self, diff --git a/crates/metal2vulkan-rt/src/import.rs b/crates/metal2vulkan-rt/src/import.rs index e357bf036..f43124a33 100644 --- a/crates/metal2vulkan-rt/src/import.rs +++ b/crates/metal2vulkan-rt/src/import.rs @@ -460,13 +460,13 @@ impl Device { /// Metal takes any page-aligned memory; here a device that offers the dma-buf only in a type /// the rule does not take refuses it, and the consumer chooses what comes next. /// - /// Err: [`Limit::NoImport`](crate::Limit::NoImport) where the device does not import a dma-buf; - /// [`Limit::ImportType`](crate::Limit::ImportType) where the rule takes no type; - /// [`Limit::ImportAlignment`](crate::Limit::ImportAlignment) for a length of 0 or one below - /// the buffer's memory requirements; [`Limit::BlockLen`](crate::Limit::BlockLen) past the + /// Err: [`Limit::NoImport`] where the device does not import a dma-buf; + /// [`Limit::ImportType`] where the rule takes no type; + /// [`Limit::ImportAlignment`] for a length of 0 or one below + /// the buffer's memory requirements; [`Limit::BlockLen`] past the /// device's longest allocation or buffer; - /// [`Limit::MemoryAllocations`](crate::Limit::MemoryAllocations); - /// [`Limit::BlockIds`](crate::Limit::BlockIds); [`Error::Vulkan`] where the query or the + /// [`Limit::MemoryAllocations`]; + /// [`Limit::BlockIds`]; [`Error::Vulkan`] where the query or the /// import fails (the fd is no dma-buf of `len` bytes or more, or the device is out of memory /// or lost); [`Error::Quiesced`]. #[cfg(unix)] @@ -537,7 +537,7 @@ impl Device { /// and so its offset in the block, is a multiple of it: the alignment in which the device binds /// a sparse buffer's memory, rounded up to the host's page (64 KiB on RADV of Mesa 26.2.6, 4 /// KiB on lavapipe). `None` where the call refuses every import - /// ([`Limit::NoImport`](crate::Limit::NoImport)): the device does not bind dma-bufs into a + /// ([`Limit::NoImport`]): the device does not bind dma-bufs into a /// sparse buffer (Mesa's Intel driver, 26.2.6, imports no dma-buf for one), or its sparse /// buffer does not take every type a plain one takes. #[cfg(unix)] @@ -581,10 +581,10 @@ impl Device { /// `maxMemoryAllocationCount`, and in [`Gauges::imports`](crate::Gauges::imports) and /// [`Gauges::blocks`](crate::Gauges::blocks) while it lives. /// - /// Err: [`Limit::NoImport`](crate::Limit::NoImport) where [`Device::dma_buf_granule`] is - /// `None`; [`Limit::ImportAlignment`](crate::Limit::ImportAlignment) for no fds, a length of + /// Err: [`Limit::NoImport`] where [`Device::dma_buf_granule`] is + /// `None`; [`Limit::ImportAlignment`] for no fds, a length of /// 0 or one that is no multiple of the granule (or of the sparse buffer's alignment); - /// [`Limit::BlockLen`](crate::Limit::BlockLen) past the device's longest allocation or buffer; + /// [`Limit::BlockLen`] past the device's longest allocation or buffer; /// [`Limit::SparseAddressSpace`](crate::Limit::SparseAddressSpace); /// [`Limit::ImportType`](crate::Limit::ImportType) where the rule takes no type for an fd, or /// another type than the first fd's (then `listed` names that type alone); diff --git a/crates/metal2vulkan-rt/src/surface.rs b/crates/metal2vulkan-rt/src/surface.rs index 3d3c2f7cc..ec97c3e16 100644 --- a/crates/metal2vulkan-rt/src/surface.rs +++ b/crates/metal2vulkan-rt/src/surface.rs @@ -38,7 +38,7 @@ use ash::vk; use std::sync::atomic::AtomicU64; use std::sync::{Arc, Mutex}; -/// For the device tests: ends an in-place make's step `name` on this thread ([`steps`]). +/// For the device tests: ends an in-place make's step `name` on this thread (the test-only `steps` module). macro_rules! step { ($name:literal) => { #[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))]