Skip to content

Commit 49dae43

Browse files
Fix cfg_attr for library/std/src/os/unix/net/ancillary.rs
1 parent d6132d0 commit 49dae43

1 file changed

Lines changed: 40 additions & 10 deletions

File tree

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

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,14 @@ impl<'a> Iterator for Messages<'a> {
577577
///
578578
/// # Example
579579
///
580-
#[cfg_attr(target_family = "unix", doc = "```no_run")]
581-
#[cfg_attr(not(target_family = "unix"), doc = "```ignore (needs unix)")]
580+
#[cfg_attr(
581+
any(target_os = "android", target_os = "linux", target_os = "cygwin"),
582+
doc = "```no_run"
583+
)]
584+
#[cfg_attr(
585+
not(any(target_os = "android", target_os = "linux", target_os = "cygwin")),
586+
doc = "```ignore (needs unix)"
587+
)]
582588
/// #![feature(unix_socket_ancillary_data)]
583589
/// use std::os::unix::net::{UnixStream, SocketAncillary, AncillaryData};
584590
/// use std::io::IoSliceMut;
@@ -617,8 +623,14 @@ impl<'a> SocketAncillary<'a> {
617623
///
618624
/// # Example
619625
///
620-
#[cfg_attr(target_family = "unix", doc = "```no_run")]
621-
#[cfg_attr(not(target_family = "unix"), doc = "```ignore (needs unix)")]
626+
#[cfg_attr(
627+
any(target_os = "android", target_os = "linux", target_os = "cygwin"),
628+
doc = "```no_run"
629+
)]
630+
#[cfg_attr(
631+
not(any(target_os = "android", target_os = "linux", target_os = "cygwin")),
632+
doc = "```ignore (needs unix)"
633+
)]
622634
/// # #![allow(unused_mut)]
623635
/// #![feature(unix_socket_ancillary_data)]
624636
/// use std::os::unix::net::SocketAncillary;
@@ -661,8 +673,14 @@ impl<'a> SocketAncillary<'a> {
661673
///
662674
/// # Example
663675
///
664-
#[cfg_attr(target_family = "unix", doc = "```no_run")]
665-
#[cfg_attr(not(target_family = "unix"), doc = "```ignore (needs unix)")]
676+
#[cfg_attr(
677+
any(target_os = "android", target_os = "linux", target_os = "cygwin"),
678+
doc = "```no_run"
679+
)]
680+
#[cfg_attr(
681+
not(any(target_os = "android", target_os = "linux", target_os = "cygwin")),
682+
doc = "```ignore (needs unix)"
683+
)]
666684
/// #![feature(unix_socket_ancillary_data)]
667685
/// use std::os::unix::net::{UnixStream, SocketAncillary};
668686
/// use std::io::IoSliceMut;
@@ -696,8 +714,14 @@ impl<'a> SocketAncillary<'a> {
696714
///
697715
/// # Example
698716
///
699-
#[cfg_attr(target_family = "unix", doc = "```no_run")]
700-
#[cfg_attr(not(target_family = "unix"), doc = "```ignore (needs unix)")]
717+
#[cfg_attr(
718+
any(target_os = "android", target_os = "linux", target_os = "cygwin"),
719+
doc = "```no_run"
720+
)]
721+
#[cfg_attr(
722+
not(any(target_os = "android", target_os = "linux", target_os = "cygwin")),
723+
doc = "```ignore (needs unix)"
724+
)]
701725
/// #![feature(unix_socket_ancillary_data)]
702726
/// use std::os::unix::net::{UnixStream, SocketAncillary};
703727
/// use std::os::unix::io::AsRawFd;
@@ -764,8 +788,14 @@ impl<'a> SocketAncillary<'a> {
764788
///
765789
/// # Example
766790
///
767-
#[cfg_attr(target_family = "unix", doc = "```no_run")]
768-
#[cfg_attr(not(target_family = "unix"), doc = "```ignore (needs unix)")]
791+
#[cfg_attr(
792+
any(target_os = "android", target_os = "linux", target_os = "cygwin"),
793+
doc = "```no_run"
794+
)]
795+
#[cfg_attr(
796+
not(any(target_os = "android", target_os = "linux", target_os = "cygwin")),
797+
doc = "```ignore (needs unix)"
798+
)]
769799
/// #![feature(unix_socket_ancillary_data)]
770800
/// use std::os::unix::net::{UnixStream, SocketAncillary, AncillaryData};
771801
/// use std::io::IoSliceMut;

0 commit comments

Comments
 (0)