Skip to content

Commit

Permalink
chore: ensure all uds gates also cfg(unix)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipetkov committed Oct 9, 2020
1 parent c421fdd commit b0020dc
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions tokio/src/io/driver/scheduled_io.rs
Expand Up @@ -32,7 +32,7 @@ cfg_io_readiness! {

#[derive(Debug, Default)]
struct Waiters {
#[cfg(any(feature = "tcp", feature = "udp", feature = "uds"))]
#[cfg(any(feature = "tcp", feature = "udp", all(unix, feature = "uds")))]
/// List of all current waiters
list: WaitList,

Expand Down Expand Up @@ -220,7 +220,7 @@ impl ScheduledIo {
}
}

#[cfg(any(feature = "tcp", feature = "udp", feature = "uds"))]
#[cfg(any(feature = "tcp", feature = "udp", all(unix, feature = "uds")))]
'outer: loop {
let mut iter = waiters.list.drain_filter(|w| ready.satisfies(w.interest));

Expand Down
2 changes: 1 addition & 1 deletion tokio/src/io/poll_evented.rs
Expand Up @@ -128,7 +128,7 @@ impl<E: Source> PollEvented<E> {
feature = "process",
feature = "tcp",
feature = "udp",
feature = "uds",
all(unix, feature = "uds"),
feature = "signal"
))]
pub(crate) fn get_ref(&self) -> &E {
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/loom/std/mod.rs
Expand Up @@ -21,7 +21,7 @@ pub(crate) mod cell {
feature = "sync",
feature = "tcp",
feature = "udp",
feature = "uds",
all(unix, feature = "uds"),
))]
pub(crate) mod future {
pub(crate) use crate::sync::AtomicWaker;
Expand Down
22 changes: 11 additions & 11 deletions tokio/src/macros/cfg.rs
Expand Up @@ -8,7 +8,7 @@ macro_rules! cfg_resource_drivers {
all(unix, feature = "signal"),
all(not(loom), feature = "tcp"),
all(not(loom), feature = "udp"),
all(not(loom), feature = "uds"),
all(not(loom), unix, feature = "uds"),
))]
$item
)*
Expand All @@ -23,7 +23,7 @@ macro_rules! cfg_not_resource_drivers {
all(unix, feature = "signal"),
all(not(loom), feature = "tcp"),
all(not(loom), feature = "udp"),
all(not(loom), feature = "uds"),
all(not(loom), unix, feature = "uds"),
)))]
$item
)*
Expand All @@ -39,7 +39,7 @@ macro_rules! cfg_either {
feature = "time",
all(not(loom), feature = "tcp"),
all(not(loom), feature = "udp"),
all(not(loom), feature = "uds"),
all(not(loom), unix, feature = "uds"),
))]
$item
)*
Expand Down Expand Up @@ -132,7 +132,7 @@ macro_rules! cfg_atomic_waker_impl {
feature = "tcp",
feature = "time",
feature = "udp",
feature = "uds",
all(unix, feature = "uds"),
))]
#[cfg(not(loom))]
$item
Expand Down Expand Up @@ -174,14 +174,14 @@ macro_rules! cfg_io_driver {
all(unix, feature = "signal"),
feature = "tcp",
feature = "udp",
feature = "uds",
all(unix, feature = "uds"),
))]
#[cfg_attr(docsrs, doc(cfg(any(
feature = "process",
all(unix, feature = "signal"),
feature = "tcp",
feature = "udp",
feature = "uds",
all(unix, feature = "uds"),
))))]
$item
)*
Expand All @@ -196,7 +196,7 @@ macro_rules! cfg_not_io_driver {
all(unix, feature = "signal"),
feature = "tcp",
feature = "udp",
feature = "uds",
all(unix, feature = "uds"),
)))]
$item
)*
Expand All @@ -206,7 +206,7 @@ macro_rules! cfg_not_io_driver {
macro_rules! cfg_io_readiness {
($($item:item)*) => {
$(
#[cfg(any(feature = "udp", feature = "uds", feature = "tcp"))]
#[cfg(any(feature = "tcp", feature = "udp", all(unix, feature = "uds")))]
$item
)*
}
Expand Down Expand Up @@ -452,7 +452,7 @@ macro_rules! cfg_uds {
($($item:item)*) => {
$(
#[cfg(all(unix, feature = "uds"))]
#[cfg_attr(docsrs, doc(cfg(feature = "uds")))]
#[cfg_attr(docsrs, doc(cfg(all(unix, feature = "uds"))))]
$item
)*
}
Expand Down Expand Up @@ -493,8 +493,8 @@ macro_rules! cfg_coop {
feature = "tcp",
feature = "time",
feature = "udp",
feature = "uds",
))]
all(unix, feature = "uds"),
))]
$item
)*
}
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/runtime/builder.rs
Expand Up @@ -143,7 +143,7 @@ impl Builder {
all(unix, feature = "signal"),
feature = "tcp",
feature = "udp",
feature = "uds",
all(unix, feature = "uds"),
))]
self.enable_io();
#[cfg(feature = "time")]
Expand Down
2 changes: 1 addition & 1 deletion tokio/src/util/linked_list.rs
Expand Up @@ -106,7 +106,7 @@ impl<L: Link> LinkedList<L, L::Target> {

/// Removes the last element from a list and returns it, or None if it is
/// empty.
#[cfg_attr(any(feature = "udp", feature = "uds"), allow(unused))]
#[cfg_attr(any(feature = "udp", all(unix, feature = "uds")), allow(unused))]
pub(crate) fn pop_back(&mut self) -> Option<L::Handle> {
unsafe {
let last = self.tail?;
Expand Down

0 comments on commit b0020dc

Please sign in to comment.