From 71c47fabf4a8a450c3b41d58de304a6a49fb4061 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Sun, 26 Jan 2020 21:54:14 -0800 Subject: chore: bump nightly version used in CI (#2178) This requires fixing a few warnings. --- azure-pipelines.yml | 2 +- tokio-macros/src/lib.rs | 3 +++ tokio/src/time/driver/atomic_stack.rs | 2 +- tokio/src/time/driver/entry.rs | 4 ++-- tokio/src/time/wheel/level.rs | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0e0108e9..4743a66a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,7 +3,7 @@ pr: ["master"] variables: RUSTFLAGS: -Dwarnings - nightly: nightly-2019-11-16 + nightly: nightly-2020-01-25 jobs: # Test top level crate diff --git a/tokio-macros/src/lib.rs b/tokio-macros/src/lib.rs index 17554470..738923b1 100644 --- a/tokio-macros/src/lib.rs +++ b/tokio-macros/src/lib.rs @@ -14,6 +14,9 @@ //! Macros for use with Tokio +// This `extern` is required for older `rustc` versions but newer `rustc` +// versions warn about the unused `extern crate`. +#[allow(unused_extern_crates)] extern crate proc_macro; mod entry; diff --git a/tokio/src/time/driver/atomic_stack.rs b/tokio/src/time/driver/atomic_stack.rs index 95d78e34..7e5a83fa 100644 --- a/tokio/src/time/driver/atomic_stack.rs +++ b/tokio/src/time/driver/atomic_stack.rs @@ -103,7 +103,7 @@ impl Iterator for AtomicStackEntries { let entry = unsafe { Arc::from_raw(self.ptr) }; // Update `self.ptr` to point to the next element of the stack - self.ptr = unsafe { (*entry.next_atomic.get()) }; + self.ptr = unsafe { *entry.next_atomic.get() }; // Unset the queued flag let res = entry.queued.fetch_and(false, SeqCst); diff --git a/tokio/src/time/driver/entry.rs b/tokio/src/time/driver/entry.rs index 079ec7e8..20cc8240 100644 --- a/tokio/src/time/driver/entry.rs +++ b/tokio/src/time/driver/entry.rs @@ -143,12 +143,12 @@ impl Entry { /// The current entry state as known by the timer. This is not the value of /// `state`, but lets the timer know how to converge its state to `state`. pub(crate) fn when_internal(&self) -> Option { - unsafe { (*self.when.get()) } + unsafe { *self.when.get() } } pub(crate) fn set_when_internal(&self, when: Option) { unsafe { - (*self.when.get()) = when; + *self.when.get() = when; } } diff --git a/tokio/src/time/wheel/level.rs b/tokio/src/time/wheel/level.rs index 73eab6ce..49f9bfb9 100644 --- a/tokio/src/time/wheel/level.rs +++ b/tokio/src/time/wheel/level.rs @@ -217,7 +217,7 @@ impl fmt::Debug for Level { } fn occupied_bit(slot: usize) -> u64 { - (1 << slot) + 1 << slot } fn slot_range(level: usize) -> u64 { -- cgit v1.2.3