summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2019-09-19 12:38:15 -0700
committerGitHub <noreply@github.com>2019-09-19 12:38:15 -0700
commit8d09f61d3317fbb87288ad8bba19beed0cde8aab (patch)
tree23358b17b0d6dfd88428d4f7e3fb34e9dcecaeab
parent815173f8e5e7c38bcaa85c433a0e8074432c5daf (diff)
net: fix build with only process (#1575)
-rw-r--r--build-tests/Cargo.toml1
-rw-r--r--build-tests/tests/features.rs6
-rw-r--r--tokio-net/Cargo.toml1
-rw-r--r--tokio-net/src/tracing.rs6
4 files changed, 11 insertions, 3 deletions
diff --git a/build-tests/Cargo.toml b/build-tests/Cargo.toml
index 66621926..6c154605 100644
--- a/build-tests/Cargo.toml
+++ b/build-tests/Cargo.toml
@@ -11,6 +11,7 @@ net-no-features = ["tokio-net"]
net-with-tcp = ["tokio-net/tcp"]
net-with-udp = ["tokio-net/udp"]
net-with-uds = ["tokio-net/uds"]
+net-with-process = ["tokio-net/process"]
tokio-no-features = ["tokio"]
tokio-with-net = ["tokio/net"]
diff --git a/build-tests/tests/features.rs b/build-tests/tests/features.rs
index 64982ad0..5bf26afc 100644
--- a/build-tests/tests/features.rs
+++ b/build-tests/tests/features.rs
@@ -26,6 +26,12 @@ fn net_with_udp() {
}
#[test]
+#[cfg(feature = "net-with-process")]
+fn net_with_process() {
+ use build_tests::tokio_net::process;
+}
+
+#[test]
#[cfg(feature = "tokio-with-net")]
fn tokio_with_net() {
// net is present
diff --git a/tokio-net/Cargo.toml b/tokio-net/Cargo.toml
index e5a0d920..00f2e30c 100644
--- a/tokio-net/Cargo.toml
+++ b/tokio-net/Cargo.toml
@@ -23,6 +23,7 @@ categories = ["asynchronous", "network-programming"]
[features]
async-traits = []
process = [
+ "tokio-io/util",
"crossbeam-queue",
"libc",
"mio-named-pipes",
diff --git a/tokio-net/src/tracing.rs b/tokio-net/src/tracing.rs
index 3034bc43..0a01d23f 100644
--- a/tokio-net/src/tracing.rs
+++ b/tokio-net/src/tracing.rs
@@ -25,7 +25,7 @@ macro_rules! trace {
#[cfg(not(feature = "tracing"))]
macro_rules! trace {
- ($($arg:tt)+) => {};
+ ($($arg:tt)+) => {{}};
}
#[cfg(feature = "tracing")]
@@ -37,7 +37,7 @@ macro_rules! debug {
#[cfg(not(feature = "tracing"))]
macro_rules! debug {
- ($($arg:tt)+) => {};
+ ($($arg:tt)+) => {{}};
}
#[cfg(feature = "tracing")]
@@ -49,7 +49,7 @@ macro_rules! error {
#[cfg(not(feature = "tracing"))]
macro_rules! error {
- ($($arg:tt)+) => {};
+ ($($arg:tt)+) => {{}};
}
#[cfg(feature = "tracing")]