Repository navigation
Document net feature requirement of SockaddrIn and SockaddrIn6 - #2854
Merged
Merged
Conversation
asomers
approved these changes
Nov 10, 2026
asomers
left a comment
Member
There was a problem hiding this comment.
LGTM. But for future reference, a mere documentation fix does not require a changelog entry.
asomers
enabled auto-merge
November 10, 2026 17:39
asomers
approved these changes
Nov 14, 2026
asomers
disabled auto-merge
November 14, 2026 00:33
asomers
enabled auto-merge
November 14, 2026 00:39
asomers
disabled auto-merge
November 14, 2026 00:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do
Fixes #2791.
SockaddrIn,SockaddrIn6andLinkAddrare defined in the privateaddrmodule and re-exported fromnix::sys::socketunder#[cfg(feature = "net")]. Because the re-export had nodoc(cfg(...)), rustdoc only showed thesocketrequirement inherited from the parent module, so docs.rs said "Available on crate feature socket only" even though these types also neednet.This adds
#[cfg_attr(docsrs, doc(cfg(feature = "net")))]to bothpub use self::addr::{...}re-exports. WithRUSTDOCFLAGS="--cfg docsrs"on nightly, the three struct pages now read "Available on crate features net and socket only." (before: "socket only"). I first tried putting the attribute on the struct definitions themselves, but rustdoc ignores it on inlined re-exports of items from a private module, so the re-export is the place that matters.No functional change;
cargo check --all-featuresandcargo check --features socketboth pass, andcargo fmt --checkis clean.I used an AI assistant to help investigate and prepare this change; I reviewed the result and verified the rendered docs locally.
Checklist:
CONTRIBUTING.md