summaryrefslogtreecommitdiffstats
path: root/tokio/src
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2020-09-23 05:55:35 +0900
committerGitHub <noreply@github.com>2020-09-23 05:55:35 +0900
commit6866b24ca1a89fb6e7dbc63e20d8a66ee60a85b8 (patch)
treee8c2ed4165cadea5e139c13f281e963ab6681fdd /tokio/src
parente7091fde786722a5301270e6281fc3c449dcfc14 (diff)
ci: deny warnings on '--cfg tokio_unstable' tests (#2859)
Diffstat (limited to 'tokio/src')
-rw-r--r--tokio/src/runtime/builder.rs4
-rw-r--r--tokio/src/runtime/tests/loom_pool.rs2
-rw-r--r--tokio/src/util/bit.rs6
3 files changed, 3 insertions, 9 deletions
diff --git a/tokio/src/runtime/builder.rs b/tokio/src/runtime/builder.rs
index ed2cd251..42aed3e9 100644
--- a/tokio/src/runtime/builder.rs
+++ b/tokio/src/runtime/builder.rs
@@ -1,4 +1,4 @@
-use crate::loom::sync::{Arc, Mutex};
+use crate::loom::sync::Mutex;
use crate::runtime::handle::Handle;
use crate::runtime::shell::Shell;
use crate::runtime::{blocking, io, time, Callback, Runtime, Spawner};
@@ -330,7 +330,7 @@ impl Builder {
where
F: Fn() + Send + Sync + 'static,
{
- self.before_stop = Some(Arc::new(f));
+ self.before_stop = Some(std::sync::Arc::new(f));
self
}
diff --git a/tokio/src/runtime/tests/loom_pool.rs b/tokio/src/runtime/tests/loom_pool.rs
index ed484846..47ee1981 100644
--- a/tokio/src/runtime/tests/loom_pool.rs
+++ b/tokio/src/runtime/tests/loom_pool.rs
@@ -209,7 +209,7 @@ mod group_b {
#[test]
fn complete_block_on_under_load() {
loom::model(|| {
- let mut pool = mk_pool(1);
+ let pool = mk_pool(1);
pool.block_on(async {
// Trigger a re-schedule
diff --git a/tokio/src/util/bit.rs b/tokio/src/util/bit.rs
index ee756044..cf3cb196 100644
--- a/tokio/src/util/bit.rs
+++ b/tokio/src/util/bit.rs
@@ -22,12 +22,6 @@ impl Pack {
Pack { mask, shift }
}
- /// Mask used to unpack value
- #[cfg(all(test, loom))]
- pub(crate) const fn mask(&self) -> usize {
- self.mask
- }
-
/// Width, in bits, dedicated to storing the value.
pub(crate) const fn width(&self) -> u32 {
pointer_width() - (self.mask >> self.shift).leading_zeros()