From 640db23de25ac555fc614e630ede701f1213d804 Mon Sep 17 00:00:00 2001 From: "Pedro M. de Echanove Pasquin" Date: Tue, 19 May 2026 22:41:42 +0200 Subject: [PATCH] =?UTF-8?q?doc:=20silence=20rustdoc=20intra-doc=20warnings?= =?UTF-8?q?=20(private-item=20links=20and=20palette/surface=20ambiguities)?= =?UTF-8?q?=20`cargo=20doc=20--no-deps`=20was=20emitting=20eight=20warning?= =?UTF-8?q?s=20about=20intra-doc=20links=20resolving=20to=20private=20item?= =?UTF-8?q?s=20or=20ambiguous=20fn/module=20names.=20None=20reflect=20a=20?= =?UTF-8?q?behaviour=20bug;=20they=20were=20just=20noise=20that=20cluttere?= =?UTF-8?q?d=20the=20docs=20build=20output.=20Five=20of=20the=20warnings?= =?UTF-8?q?=20came=20from=20doc=20comments=20that=20cross-referenced=20ite?= =?UTF-8?q?ms=20not=20in=20the=20rendered=20public=20API.=20`widget::scrol?= =?UTF-8?q?l::Scroll`=20(struct),=20`Scroll::horizontal`,=20`Scroll::both`?= =?UTF-8?q?,=20`event=5Floop::text=5Fediting`=20(module)=20and=20`text=5Fs?= =?UTF-8?q?haping`=20(module)=20are=20all=20`pub`=20in=20their=20own=20mod?= =?UTF-8?q?ules,=20but=20the=20`widget`=20and=20`event=5Floop`=20parents?= =?UTF-8?q?=20are=20private=20to=20the=20crate=20root,=20so=20rustdoc=20tr?= =?UTF-8?q?eats=20them=20as=20private=20when=20resolving=20links=20from=20?= =?UTF-8?q?items=20that=20ARE=20on=20the=20public=20surface=20(`ScrollAxis?= =?UTF-8?q?`,=20the=20`scroll`=20constructor,=20`font=5Fbytes`,=20the=20`t?= =?UTF-8?q?ext=5Fedit`=20module=20docs).=20The=20fix=20is=20to=20drop=20th?= =?UTF-8?q?e=20link=20syntax=20for=20those=20references:=20keep=20the=20id?= =?UTF-8?q?entifier=20in=20backticks=20(so=20it=20still=20renders=20as=20c?= =?UTF-8?q?ode)=20but=20remove=20the=20surrounding=20`[...]`=20so=20rustdo?= =?UTF-8?q?c=20doesn't=20try=20to=20resolve=20it.=20Where=20the=20cross-re?= =?UTF-8?q?ference=20had=20no=20semantic=20load=20beyond=20"see=20this=20m?= =?UTF-8?q?odule",=20the=20prose=20is=20rephrased=20to=20name=20the=20modu?= =?UTF-8?q?le=20without=20trying=20to=20link=20to=20it=20(e.g.=20"the=20`e?= =?UTF-8?q?vent=5Floop::text=5Fediting`=20private=20module",=20"see=20the?= =?UTF-8?q?=20`text=5Fshaping`=20private=20module").=20The=20remaining=20t?= =?UTF-8?q?hree=20warnings=20were=20`palette`=20/=20`surface`=20linking=20?= =?UTF-8?q?ambiguously=20between=20a=20module=20of=20that=20name=20and=20a?= =?UTF-8?q?=20function=20of=20the=20same=20name=20within=20`crate::theme`.?= =?UTF-8?q?=20Adding=20`()`=20after=20the=20identifier=20inside=20the=20br?= =?UTF-8?q?ackets=20(`palette`=20=E2=86=92=20`palette()`,=20`surface`=20?= =?UTF-8?q?=E2=86=92=20`surface()`)=20disambiguates=20to=20the=20function,?= =?UTF-8?q?=20which=20is=20the=20intent=20in=20all=20three=20sites=20?= =?UTF-8?q?=E2=80=94=20the=20surrounding=20text=20talks=20about=20"per-slo?= =?UTF-8?q?t=20shorthand=20accessors",=20which=20is=20what=20the=20functio?= =?UTF-8?q?ns=20are.=20After=20this=20`cargo=20doc=20--no-deps`=20runs=20c?= =?UTF-8?q?lean=20with=20no=20warnings.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gles_render/mod.rs | 2 +- src/theme/active.rs | 2 +- src/theme/mod.rs | 2 +- src/theme/palette.rs | 2 +- src/widget/scroll/mod.rs | 4 ++-- src/widget/text_edit/mod.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gles_render/mod.rs b/src/gles_render/mod.rs index 8b19af6..ac08b59 100644 --- a/src/gles_render/mod.rs +++ b/src/gles_render/mod.rs @@ -138,7 +138,7 @@ pub struct GlesCanvas /// theme registry. pub font: Arc, /// Raw bytes of the default font. Required by rustybuzz for - /// HarfBuzz shaping (see [`crate::text_shaping`]). Kept on the + /// HarfBuzz shaping (see the `text_shaping` private module). Kept on the /// canvas so the shape pipeline has direct access without a /// global lookup. pub font_bytes: Arc>, diff --git a/src/theme/active.rs b/src/theme/active.rs index e27b08e..e58f421 100644 --- a/src/theme/active.rs +++ b/src/theme/active.rs @@ -126,7 +126,7 @@ pub fn active_mode() -> ThemeMode } /// The currently loaded theme document. Use this for slot-typed lookups -/// when the per-slot helpers ([`crate::theme::color`], [`crate::theme::surface`], …) are not +/// when the per-slot helpers ([`crate::theme::color`], [`crate::theme::surface()`], …) are not /// expressive enough — e.g. iterating `mode.slots.entries`. pub fn active_document() -> Arc { diff --git a/src/theme/mod.rs b/src/theme/mod.rs index 45f4fda..6b20c6f 100644 --- a/src/theme/mod.rs +++ b/src/theme/mod.rs @@ -32,7 +32,7 @@ //! state. Use [`set_active_document`] / [`set_active_mode`] to change it, //! and [`active_document`] / [`active_mode`] / [`active_theme_id`] to read //! it back. Per-slot shorthand accessors ([`color`], [`paint()`], [`surface()`], -//! [`palette`], …) cover the common patterns without going through the +//! [`palette()`], …) cover the common patterns without going through the //! full document. //! //! There is **no in-code fallback**: if `ensure_active` cannot locate the diff --git a/src/theme/palette.rs b/src/theme/palette.rs index 36f3c67..bc3808d 100644 --- a/src/theme/palette.rs +++ b/src/theme/palette.rs @@ -51,7 +51,7 @@ impl Palette /// (`bg-page`, `surface`, `surface-alt`, `text-primary`, /// `text-secondary`, `accent`, `divider`, `icon`). Missing slots /// fall back to a documented sensible default so downstream widgets - /// never see uninitialised colours. Used by [`crate::theme::palette`] and + /// never see uninitialised colours. Used by [`crate::theme::palette()`] and /// [`crate::theme::window_controls`]. pub fn from_slots( slots: &SlotStore ) -> Self { diff --git a/src/widget/scroll/mod.rs b/src/widget/scroll/mod.rs index 16fcd13..98a84dc 100644 --- a/src/widget/scroll/mod.rs +++ b/src/widget/scroll/mod.rs @@ -8,7 +8,7 @@ use crate::widget::Element; #[cfg(test)] mod tests; -/// Which axes a [`Scroll`] viewport allows to move along. Determines +/// Which axes a `Scroll` viewport allows to move along. Determines /// whether the layout grows the child past the viewport width, the /// viewport height, or both, and which axis gesture / wheel deltas /// route to. @@ -139,7 +139,7 @@ pub(crate) fn clamp_offset( offset: f32, content_h: f32, viewport_h: f32 ) -> f3 } /// Create a scrollable viewport wrapping `child`. Defaults to vertical -/// scrolling; chain [`Scroll::horizontal`] or [`Scroll::both`] to +/// scrolling; chain `Scroll::horizontal` or `Scroll::both` to /// switch axes. /// /// The parent layout controls the viewport size by assigning a rect to diff --git a/src/widget/text_edit/mod.rs b/src/widget/text_edit/mod.rs index de7f894..cafe1a8 100644 --- a/src/widget/text_edit/mod.rs +++ b/src/widget/text_edit/mod.rs @@ -4,7 +4,7 @@ //! Text input field — single-line or multiline. The widget itself //! owns layout / draw; the runtime side of text editing //! (insert, delete, cursor movement, selection, clipboard) -//! lives in [`crate::event_loop::text_editing`]. +//! lives in the `event_loop::text_editing` private module. use std::sync::Arc;