Skip to content

Commit ce2d819

Browse files
committed
Fix fallback for doc generation
1 parent 7afb457 commit ce2d819

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

gio/src/socket.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -882,48 +882,40 @@ impl<O: IsA<Socket>> SocketExtManual for O {
882882
}
883883
}
884884

885-
#[cfg(not(unix))]
886-
#[cfg_attr(docsrs, doc(cfg(not(unix))))]
885+
#[cfg(all(docsrs, not(unix)))]
887886
pub trait IntoRawFd {
888887
fn into_raw_fd(self) -> c_int;
889888
}
890889

891-
#[cfg(not(unix))]
892-
#[cfg_attr(docsrs, doc(cfg(not(unix))))]
890+
#[cfg(all(docsrs, not(unix)))]
893891
pub trait FromRawFd {
894892
unsafe fn from_raw_fd(fd: c_int) -> Self;
895893
}
896894

897-
#[cfg(not(unix))]
898-
#[cfg_attr(docsrs, doc(cfg(not(unix))))]
895+
#[cfg(all(docsrs, not(unix)))]
899896
pub trait AsRawFd {
900897
fn as_raw_fd(&self) -> RawFd;
901898
}
902899

903-
#[cfg(not(unix))]
904-
#[cfg_attr(docsrs, doc(cfg(not(unix))))]
900+
#[cfg(all(docsrs, not(unix)))]
905901
pub type RawFd = c_int;
906902

907-
#[cfg(not(windows))]
908-
#[cfg_attr(docsrs, doc(cfg(not(windows))))]
903+
#[cfg(all(docsrs, not(windows)))]
909904
pub trait IntoRawSocket {
910905
fn into_raw_socket(self) -> u64;
911906
}
912907

913-
#[cfg(not(windows))]
914-
#[cfg_attr(docsrs, doc(cfg(not(windows))))]
908+
#[cfg(all(docsrs, not(windows)))]
915909
pub trait FromRawSocket {
916910
unsafe fn from_raw_socket(sock: u64) -> Self;
917911
}
918912

919-
#[cfg(not(windows))]
920-
#[cfg_attr(docsrs, doc(cfg(not(windows))))]
913+
#[cfg(all(docsrs, not(windows)))]
921914
pub trait AsRawSocket {
922915
fn as_raw_socket(&self) -> RawSocket;
923916
}
924917

925-
#[cfg(not(windows))]
926-
#[cfg_attr(docsrs, doc(cfg(not(windows))))]
918+
#[cfg(all(docsrs, not(windows)))]
927919
pub type RawSocket = *mut c_void;
928920

929921
#[cfg(test)]

0 commit comments

Comments
 (0)