Skip to content

Commit f6efb0b

Browse files
committed
Fix doc build on unsupported oses
1 parent 10f5a19 commit f6efb0b

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

library/std/src/os/unix/net/datagram.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,14 @@ impl UnixDatagram {
840840

841841
/// Set the id of the socket for network filtering purpose
842842
///
843-
/// ```no_run
843+
#[cfg_attr(
844+
any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"),
845+
doc = "```no_run"
846+
)]
847+
#[cfg_attr(
848+
not(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd")),
849+
doc = "```ignore"
850+
)]
844851
/// #![feature(unix_set_mark)]
845852
/// use std::os::unix::net::UnixDatagram;
846853
///

library/std/src/os/unix/net/stream.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,14 @@ impl UnixStream {
426426

427427
/// Set the id of the socket for network filtering purpose
428428
///
429-
/// ```no_run
429+
#[cfg_attr(
430+
any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"),
431+
doc = "```no_run"
432+
)]
433+
#[cfg_attr(
434+
not(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd")),
435+
doc = "```ignore"
436+
)]
430437
/// #![feature(unix_set_mark)]
431438
/// use std::os::unix::net::UnixStream;
432439
///

0 commit comments

Comments
 (0)