UdpSocket: document recv/recv_from differences#154266
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Apr 1, 2026
Merged
UdpSocket: document recv/recv_from differences#154266rust-bors[bot] merged 1 commit intorust-lang:mainfrom
recv/recv_from differences#154266rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
Mark-Simulacrum
requested changes
Mar 27, 2026
| /// | ||
| /// Refer to the platform-specific documentation on this function; it is considered | ||
| /// correct for its behavior to differ from [`UdpSocket::recv`] if the underlying system | ||
| /// call does so. |
Member
There was a problem hiding this comment.
This sounds fine, but we don't tell people what this does under the hood, so I'm not sure they can refer to platform-specific documentation easily. Maybe we can add a section on what the underlying libc/syscall made is (with a link to https://doc.rust-lang.org/nightly/std/io/index.html#platform-specific-behavior)?
Member
Author
There was a problem hiding this comment.
Discussed this in the libs-api meeting; we intentionally don't guarantee this right now, but most platforms have an "obvious" choice (e.g. recvfrom on linux)
Member
Author
|
@bors r=Mark-Simulacrum rollup |
Contributor
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.
Per libs-api consensus, fixes #149392 by documenting possible platform-specific behavior in
UdpSocket.r? libs