Skip to content

Commit

Permalink
Fix doc build on unsupported oses
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Jul 7, 2022
1 parent 10f5a19 commit f6efb0b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion library/std/src/os/unix/net/datagram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,14 @@ impl UnixDatagram {

/// Set the id of the socket for network filtering purpose
///
/// ```no_run
#[cfg_attr(
any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"),
doc = "```no_run"
)]
#[cfg_attr(
not(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd")),
doc = "```ignore"
)]
/// #![feature(unix_set_mark)]
/// use std::os::unix::net::UnixDatagram;
///
Expand Down
9 changes: 8 additions & 1 deletion library/std/src/os/unix/net/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,14 @@ impl UnixStream {

/// Set the id of the socket for network filtering purpose
///
/// ```no_run
#[cfg_attr(
any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"),
doc = "```no_run"
)]
#[cfg_attr(
not(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd")),
doc = "```ignore"
)]
/// #![feature(unix_set_mark)]
/// use std::os::unix::net::UnixStream;
///
Expand Down

0 comments on commit f6efb0b

Please sign in to comment.