summaryrefslogtreecommitdiffstats
path: root/tokio/src/sync/notify.rs
diff options
context:
space:
mode:
authorLucio Franco <luciofranco14@gmail.com>2020-09-23 14:35:10 -0400
committerGitHub <noreply@github.com>2020-09-23 14:35:10 -0400
commitf25f12d57638a2928b3f738b3b1392d8773e276e (patch)
tree04da3ba7022a42bf8d1d08a039fcc1fc2fc95313 /tokio/src/sync/notify.rs
parent0f70530ee7cda68b68f2f8131b5866cfa937ee1f (diff)
rt: Allow concurrent `block_on`'s with basic_scheduler (#2804)
Diffstat (limited to 'tokio/src/sync/notify.rs')
-rw-r--r--tokio/src/sync/notify.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tokio/src/sync/notify.rs b/tokio/src/sync/notify.rs
index 56bbc51b..d319e8aa 100644
--- a/tokio/src/sync/notify.rs
+++ b/tokio/src/sync/notify.rs
@@ -1,3 +1,10 @@
+// Allow `unreachable_pub` warnings when sync is not enabled
+// due to the usage of `Notify` within the `rt-core` feature set.
+// When this module is compiled with `sync` enabled we will warn on
+// this lint. When `rt-core` is enabled we use `pub(crate)` which
+// triggers this warning but it is safe to ignore in this case.
+#![cfg_attr(not(feature = "sync"), allow(unreachable_pub, dead_code))]
+
use crate::loom::sync::atomic::AtomicU8;
use crate::loom::sync::Mutex;
use crate::util::linked_list::{self, LinkedList};