From 209725741d678601fcf5ca6acd0ad3d858dbed22 Mon Sep 17 00:00:00 2001 From: Iain McGinniss <309153+iainmcgin@users.noreply.github.com> Date: Wed, 29 Apr 2026 20:17:48 +0000 Subject: [PATCH] docs: fix broken intra-doc links under -D warnings SENTINEL_MOD and package_to_mod_filename linked to the crate-private validate_file; extension.rs linked to the type_registry module which is gated behind cfg(any(json, text)). Both fail RUSTDOCFLAGS=-D warnings cargo doc on default features. Replaced with plain code spans. --- buffa-codegen/src/context.rs | 2 +- buffa-codegen/src/lib.rs | 2 +- buffa/src/extension.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/buffa-codegen/src/context.rs b/buffa-codegen/src/context.rs index 3d3940e..dfa5e10 100644 --- a/buffa-codegen/src/context.rs +++ b/buffa-codegen/src/context.rs @@ -12,7 +12,7 @@ use crate::CodeGenConfig; /// /// See `DESIGN.md` → "Generated code layout" for the full layout. The name /// is checked against proto package segments and message-module names by -/// [`crate::validate_file`]; a collision is a hard error. +/// `validate_file`; a collision is a hard error. pub const SENTINEL_MOD: &str = "__buffa"; /// A Rust type path split at the target-package boundary. diff --git a/buffa-codegen/src/lib.rs b/buffa-codegen/src/lib.rs index c7e4bd3..f8fb3a4 100644 --- a/buffa-codegen/src/lib.rs +++ b/buffa-codegen/src/lib.rs @@ -888,7 +888,7 @@ fn format_tokens(tokens: TokenStream, source: &str) -> Result String { if package.is_empty() { diff --git a/buffa/src/extension.rs b/buffa/src/extension.rs index 020cc5d..d6643c1 100644 --- a/buffa/src/extension.rs +++ b/buffa/src/extension.rs @@ -51,9 +51,9 @@ //! # JSON //! //! Extension fields serialize as `"[pkg.ext]"` keys in proto3 JSON. This -//! requires a populated [`TypeRegistry`](crate::type_registry::TypeRegistry) -//! — see the [`type_registry`](crate::type_registry) module. Without a -//! registry, extension bytes stay in `__buffa_unknown_fields` and are silently +//! requires a populated `TypeRegistry` — see the `type_registry` module +//! (available under the `json` or `text` feature). Without a registry, +//! extension bytes stay in `__buffa_unknown_fields` and are silently //! dropped from JSON output. //! //! # Presence semantics