Fix doc build on unsupported oses

This commit is contained in:
David CARLIER 2022-07-07 13:45:05 +01:00
parent 10f5a19a4d
commit f6efb0b74f
2 changed files with 16 additions and 2 deletions

View File

@ -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;
///

View File

@ -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;
///