Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions library/std/src/net/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ impl UdpSocket {
/// hold the message bytes. If a message is too long to fit in the supplied buffer,
/// excess bytes may be discarded.
///
/// 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.
///
/// # Examples
///
/// ```no_run
Expand Down Expand Up @@ -711,6 +715,10 @@ impl UdpSocket {
/// [`UdpSocket::connect`] will connect this socket to a remote address. This
/// method will fail if the socket is not connected.
///
/// Refer to the platform-specific documentation on this function; it is considered
/// correct for its behavior to differ from [`UdpSocket::recv_from`] if the underlying
/// system call does so.
///
/// # Examples
///
/// ```no_run
Expand Down
10 changes: 10 additions & 0 deletions src/doc/rustdoc/src/lints.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ To fix the lint, you need to add a code example into the documentation block:
pub fn no_code_example() {}
```

This lint is not emitted on the following items:

* Impl blocks (both trait and inherent)
* Enum variants
* Struct/union fields
* Type aliases, including associated types
* Statics/constants
* Modules (including the top-level module of a crate)
* Foreign items from reexports (functions, statics, types, etc)

## `private_doc_tests`

This lint is **allowed by default**. It detects documentation tests when they
Expand Down
Loading