diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0e0108e96f5..4743a66a4d4 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 17554470503..738923b1e3f 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 95d78e34f1e..7e5a83fa521 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 079ec7e893e..20cc824019a 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 73eab6ce5e6..49f9bfb9cf0 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 {