Skip to content

Commit 700cfa8

Browse files
committed
Auto merge of #154649 - JonathanBrouwer:rollup-3KmleSY, r=JonathanBrouwer
Rollup of 2 pull requests Successful merges: - #154249 (Mention on which items the `missing_doc_code_examples` is not emitted) - #154266 (UdpSocket: document `recv/recv_from` differences)
2 parents 48cc71e + 807b9ae commit 700cfa8

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

library/std/src/net/udp.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ impl UdpSocket {
129129
/// hold the message bytes. If a message is too long to fit in the supplied buffer,
130130
/// excess bytes may be discarded.
131131
///
132+
/// Refer to the platform-specific documentation on this function; it is considered
133+
/// correct for its behavior to differ from [`UdpSocket::recv`] if the underlying system
134+
/// call does so.
135+
///
132136
/// # Examples
133137
///
134138
/// ```no_run
@@ -711,6 +715,10 @@ impl UdpSocket {
711715
/// [`UdpSocket::connect`] will connect this socket to a remote address. This
712716
/// method will fail if the socket is not connected.
713717
///
718+
/// Refer to the platform-specific documentation on this function; it is considered
719+
/// correct for its behavior to differ from [`UdpSocket::recv_from`] if the underlying
720+
/// system call does so.
721+
///
714722
/// # Examples
715723
///
716724
/// ```no_run

src/doc/rustdoc/src/lints.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,16 @@ To fix the lint, you need to add a code example into the documentation block:
190190
pub fn no_code_example() {}
191191
```
192192

193+
This lint is not emitted on the following items:
194+
195+
* Impl blocks (both trait and inherent)
196+
* Enum variants
197+
* Struct/union fields
198+
* Type aliases, including associated types
199+
* Statics/constants
200+
* Modules (including the top-level module of a crate)
201+
* Foreign items from reexports (functions, statics, types, etc)
202+
193203
## `private_doc_tests`
194204

195205
This lint is **allowed by default**. It detects documentation tests when they

0 commit comments

Comments
 (0)