summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml2
-rw-r--r--azure-pipelines.yml2
-rw-r--r--ci/azure-install-rust.yml2
-rw-r--r--rust-toolchain2
-rw-r--r--tokio-codec/src/framed.rs5
-rw-r--r--tokio-codec/src/framed_write.rs5
-rw-r--r--tokio-codec/tests/framed_read.rs2
-rw-r--r--tokio-current-thread/src/lib.rs10
-rw-r--r--tokio-current-thread/src/scheduler.rs4
-rw-r--r--tokio-current-thread/tests/current_thread.rs2
-rw-r--r--tokio-executor/src/global.rs2
-rw-r--r--tokio-executor/tests/enter.rs2
-rw-r--r--tokio-executor/tests/executor.rs2
-rw-r--r--tokio-fs/src/file.rs7
-rw-r--r--tokio-fs/src/open_options.rs1
-rw-r--r--tokio-fs/src/read_dir.rs2
-rw-r--r--tokio-io/src/async_buf_read.rs24
-rw-r--r--tokio-io/src/io/copy.rs2
-rw-r--r--tokio-io/src/io/flush.rs2
-rw-r--r--tokio-io/src/io/read.rs2
-rw-r--r--tokio-io/src/io/read_exact.rs2
-rw-r--r--tokio-io/src/io/shutdown.rs2
-rw-r--r--tokio-io/src/io/write.rs2
-rw-r--r--tokio-process/src/kill.rs2
-rw-r--r--tokio-process/src/unix/orphan.rs4
-rw-r--r--tokio-signal/examples/multiple.rs1
-rw-r--r--tokio-sync/src/lock.rs1
-rw-r--r--tokio-sync/src/mpsc/bounded.rs2
-rw-r--r--tokio-sync/src/mpsc/unbounded.rs1
-rw-r--r--tokio-sync/src/oneshot.rs1
-rw-r--r--tokio-sync/src/task/atomic_waker.rs2
-rw-r--r--tokio-sync/src/watch.rs8
-rw-r--r--tokio-sync/tests/fuzz_oneshot.rs2
-rw-r--r--tokio-tcp/src/listener.rs1
-rw-r--r--tokio-threadpool/src/sender.rs2
-rw-r--r--tokio-threadpool/src/task/mod.rs2
-rw-r--r--tokio-threadpool/src/worker/mod.rs2
-rw-r--r--tokio-threadpool/tests/threadpool.rs2
-rw-r--r--tokio-timer/src/clock/mod.rs2
-rw-r--r--tokio-timer/src/interval.rs1
-rw-r--r--tokio-tls/src/lib.rs3
-rw-r--r--tokio-udp/src/split.rs2
-rw-r--r--tokio-uds/src/listener.rs1
-rw-r--r--tokio/examples/tinyhttp.rs4
44 files changed, 45 insertions, 89 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 455c5813..52f6255c 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -14,7 +14,7 @@ task:
- pkg install -y curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
# TODO: switch back to nightly
- - sh rustup.sh -y --default-toolchain nightly-2019-07-17
+ - sh rustup.sh -y --default-toolchain nightly-2019-08-10
- . $HOME/.cargo/env
- rustup target add i686-unknown-freebsd
- |
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 6e945985..ecdd26d7 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -2,7 +2,7 @@ trigger: ["master", "std-future"]
pr: ["master", "std-future"]
variables:
- nightly: nightly-2019-07-17
+ nightly: nightly-2019-08-10
RUSTFLAGS: -Dwarnings
jobs:
diff --git a/ci/azure-install-rust.yml b/ci/azure-install-rust.yml
index 2892ab89..02176592 100644
--- a/ci/azure-install-rust.yml
+++ b/ci/azure-install-rust.yml
@@ -27,8 +27,6 @@ steps:
# All platforms.
- script: |
- rustup toolchain install nightly
- rustup update
rustup toolchain list
rustc -Vv
cargo -V
diff --git a/rust-toolchain b/rust-toolchain
index fead76e7..54dbba0d 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1 @@
-nightly-2019-07-17 \ No newline at end of file
+nightly-2019-08-10
diff --git a/tokio-codec/src/framed.rs b/tokio-codec/src/framed.rs
index 707353db..da131ee1 100644
--- a/tokio-codec/src/framed.rs
+++ b/tokio-codec/src/framed.rs
@@ -234,10 +234,7 @@ impl<T: AsyncRead + Unpin, U: Unpin> AsyncRead for Fuse<T, U> {
}
impl<T: AsyncBufRead + Unpin, U: Unpin> AsyncBufRead for Fuse<T, U> {
- fn poll_fill_buf<'a>(
- self: Pin<&'a mut Self>,
- cx: &mut Context<'_>,
- ) -> Poll<io::Result<&'a [u8]>> {
+ fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
pin!(self.get_mut().0).poll_fill_buf(cx)
}
diff --git a/tokio-codec/src/framed_write.rs b/tokio-codec/src/framed_write.rs
index 34d24606..0ea45b5c 100644
--- a/tokio-codec/src/framed_write.rs
+++ b/tokio-codec/src/framed_write.rs
@@ -280,10 +280,7 @@ impl<T: AsyncRead + Unpin> AsyncRead for FramedWrite2<T> {
}
impl<T: AsyncBufRead + Unpin> AsyncBufRead for FramedWrite2<T> {
- fn poll_fill_buf<'a>(
- self: Pin<&'a mut Self>,
- cx: &mut Context<'_>,
- ) -> Poll<io::Result<&'a [u8]>> {
+ fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
pin!(self.get_mut().inner).poll_fill_buf(cx)
}
diff --git a/tokio-codec/tests/framed_read.rs b/tokio-codec/tests/framed_read.rs
index 4215c04c..dc36d8b9 100644
--- a/tokio-codec/tests/framed_read.rs
+++ b/tokio-codec/tests/framed_read.rs
@@ -284,7 +284,7 @@ impl AsyncRead for Mock {
// TODO this newtype is necessary because `&[u8]` does not currently implement `AsyncRead`
struct Slice<'a>(&'a [u8]);
-impl<'a> AsyncRead for Slice<'a> {
+impl AsyncRead for Slice<'_> {
fn poll_read(
mut self: Pin<&mut Self>,
cx: &mut Context<'_>,
diff --git a/tokio-current-thread/src/lib.rs b/tokio-current-thread/src/lib.rs
index 483b1fd0..f22fb70e 100644
--- a/tokio-current-thread/src/lib.rs
+++ b/tokio-current-thread/src/lib.rs
@@ -429,7 +429,7 @@ impl<P: Park + Default> Default for CurrentThread<P> {
// ===== impl Entered =====
-impl<'a, P: Park> Entered<'a, P> {
+impl<P: Park> Entered<'_, P> {
/// Spawn the future on the executor.
///
/// This internally queues the future to be executed once `run` is called.
@@ -593,7 +593,7 @@ impl<'a, P: Park> Entered<'a, P> {
}
}
-impl<'a, P: Park> fmt::Debug for Entered<'a, P> {
+impl<P: Park> fmt::Debug for Entered<'_, P> {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_struct("Entered")
.field("executor", &self.executor)
@@ -738,7 +738,7 @@ where
// ===== impl Borrow =====
-impl<'a, U: Unpark> Borrow<'a, U> {
+impl<U: Unpark> Borrow<'_, U> {
fn enter<F, R>(&mut self, f: F) -> R
where
F: FnOnce() -> R,
@@ -750,7 +750,7 @@ impl<'a, U: Unpark> Borrow<'a, U> {
}
}
-impl<'a, U: Unpark> SpawnLocal for Borrow<'a, U> {
+impl<U: Unpark> SpawnLocal for Borrow<'_, U> {
fn spawn_local(&mut self, future: Pin<Box<dyn Future<Output = ()>>>, already_counted: bool) {
if !already_counted {
// NOTE: we have a borrow of the Runtime, so we know that it isn't shut down.
@@ -770,7 +770,7 @@ impl CurrentRunner {
{
struct Reset<'a>(&'a CurrentRunner);
- impl<'a> Drop for Reset<'a> {
+ impl Drop for Reset<'_> {
fn drop(&mut self) {
self.0.spawn.set(None);
self.0.id.set(None);
diff --git a/tokio-current-thread/src/scheduler.rs b/tokio-current-thread/src/scheduler.rs
index 29dc42e4..06ad2aa6 100644
--- a/tokio-current-thread/src/scheduler.rs
+++ b/tokio-current-thread/src/scheduler.rs
@@ -253,7 +253,7 @@ where
node: Option<Arc<Node<U>>>,
}
- impl<'a, U: Unpark> Drop for Bomb<'a, U> {
+ impl<U: Unpark> Drop for Bomb<'_, U> {
fn drop(&mut self) {
if let Some(node) = self.node.take() {
self.borrow.enter(|| release_node(node))
@@ -329,7 +329,7 @@ where
}
}
-impl<'a, U: Unpark> Scheduled<'a, U> {
+impl<U: Unpark> Scheduled<'_, U> {
/// Polls the task, returns `true` if the task has completed.
pub fn tick(&mut self) -> bool {
let waker = unsafe {
diff --git a/tokio-current-thread/tests/current_thread.rs b/tokio-current-thread/tests/current_thread.rs
index a2ec5ce6..48fe7bdd 100644
--- a/tokio-current-thread/tests/current_thread.rs
+++ b/tokio-current-thread/tests/current_thread.rs
@@ -380,7 +380,6 @@ mod and_turn {
},
);
}
-
}
mod in_drop {
@@ -441,7 +440,6 @@ mod in_drop {
},
);
}
-
}
/*
diff --git a/tokio-executor/src/global.rs b/tokio-executor/src/global.rs
index f95a1486..bf4d9be3 100644
--- a/tokio-executor/src/global.rs
+++ b/tokio-executor/src/global.rs
@@ -153,7 +153,7 @@ where
// when leaving the scope. This handles cases that involve panicking.
struct Reset<'a>(&'a Cell<State>, State);
- impl<'a> Drop for Reset<'a> {
+ impl Drop for Reset<'_> {
fn drop(&mut self) {
self.0.set(self.1);
}
diff --git a/tokio-executor/tests/enter.rs b/tokio-executor/tests/enter.rs
index 25ef6006..fd13bd12 100644
--- a/tokio-executor/tests/enter.rs
+++ b/tokio-executor/tests/enter.rs
@@ -1,5 +1,5 @@
#![warn(rust_2018_idioms)]
-#![feature(await_macro, async_await)]
+#![feature(async_await)]
#[test]
fn block_on_ready() {
diff --git a/tokio-executor/tests/executor.rs b/tokio-executor/tests/executor.rs
index 608db157..fb039385 100644
--- a/tokio-executor/tests/executor.rs
+++ b/tokio-executor/tests/executor.rs
@@ -1,5 +1,5 @@
#![warn(rust_2018_idioms)]
-#![feature(await_macro, async_await)]
+#![feature(async_await)]
use tokio_executor::{self, DefaultExecutor};
diff --git a/tokio-fs/src/file.rs b/tokio-fs/src/file.rs
index ca1e14a0..43b927ec 100644
--- a/tokio-fs/src/file.rs
+++ b/tokio-fs/src/file.rs
@@ -184,7 +184,6 @@ impl File {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn seek(&mut self, pos: io::SeekFrom) -> io::Result<u64> {
asyncify(|| self.std.seek(pos)).await
}
@@ -209,7 +208,6 @@ impl File {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn sync_all(&mut self) -> io::Result<()> {
asyncify(|| self.std.sync_all()).await
}
@@ -238,7 +236,6 @@ impl File {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn sync_data(&mut self) -> io::Result<()> {
asyncify(|| self.std.sync_data()).await
}
@@ -270,7 +267,6 @@ impl File {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn set_len(&mut self, size: u64) -> io::Result<()> {
asyncify(|| self.std.set_len(size)).await
}
@@ -292,7 +288,6 @@ impl File {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn metadata(&self) -> io::Result<Metadata> {
asyncify(|| self.std.metadata()).await
}
@@ -314,7 +309,6 @@ impl File {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn try_clone(&self) -> io::Result<File> {
let std_file = asyncify(|| self.std.try_clone()).await?;
Ok(File::from_std(std_file))
@@ -351,7 +345,6 @@ impl File {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn set_permissions(&self, perm: Permissions) -> io::Result<()> {
asyncify(|| self.std.set_permissions(perm)).await
}
diff --git a/tokio-fs/src/open_options.rs b/tokio-fs/src/open_options.rs
index ff979772..85b6f1db 100644
--- a/tokio-fs/src/open_options.rs
+++ b/tokio-fs/src/open_options.rs
@@ -89,7 +89,6 @@ impl OpenOptions {
/// Tokio runtime or if the underlying [`open`] call results in an error.
///
/// [`open`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.open
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn open<P>(&self, path: P) -> io::Result<File>
where
P: AsRef<Path> + Send + Unpin + 'static,
diff --git a/tokio-fs/src/read_dir.rs b/tokio-fs/src/read_dir.rs
index 33209e75..f3f12ace 100644
--- a/tokio-fs/src/read_dir.rs
+++ b/tokio-fs/src/read_dir.rs
@@ -182,7 +182,6 @@ impl DirEntry {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn metadata(&self) -> io::Result<Metadata> {
asyncify(|| self.0.metadata()).await
}
@@ -222,7 +221,6 @@ impl DirEntry {
/// # Ok(())
/// # }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn file_type(&self) -> io::Result<FileType> {
asyncify(|| self.0.file_type()).await
}
diff --git a/tokio-io/src/async_buf_read.rs b/tokio-io/src/async_buf_read.rs
index d0c4952d..dfac44f3 100644
--- a/tokio-io/src/async_buf_read.rs
+++ b/tokio-io/src/async_buf_read.rs
@@ -31,10 +31,7 @@ pub trait AsyncBufRead: AsyncRead {
///
/// [`poll_read`]: AsyncRead::poll_read
/// [`consume`]: AsyncBufRead::consume
- fn poll_fill_buf<'a>(
- self: Pin<&'a mut Self>,
- cx: &mut Context<'_>,
- ) -> Poll<io::Result<&'a [u8]>>;
+ fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>>;
/// Tells this buffer that `amt` bytes have been consumed from the buffer,
/// so they should no longer be returned in calls to [`poll_read`].
@@ -56,8 +53,8 @@ pub trait AsyncBufRead: AsyncRead {
macro_rules! deref_async_buf_read {
() => {
- fn poll_fill_buf<'a>(self: Pin<&'a mut Self>, cx: &mut Context<'_>)
- -> Poll<io::Result<&'a [u8]>>
+ fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>)
+ -> Poll<io::Result<&[u8]>>
{
Pin::new(&mut **self.get_mut()).poll_fill_buf(cx)
}
@@ -81,10 +78,7 @@ where
P: DerefMut + Unpin,
P::Target: AsyncBufRead,
{
- fn poll_fill_buf<'a>(
- self: Pin<&'a mut Self>,
- cx: &mut Context<'_>,
- ) -> Poll<io::Result<&'a [u8]>> {
+ fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
self.get_mut().as_mut().poll_fill_buf(cx)
}
@@ -94,10 +88,7 @@ where
}
impl AsyncBufRead for &[u8] {
- fn poll_fill_buf<'a>(
- self: Pin<&'a mut Self>,
- _cx: &mut Context<'_>,
- ) -> Poll<io::Result<&'a [u8]>> {
+ fn poll_fill_buf(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
Poll::Ready(Ok(*self))
}
@@ -107,10 +98,7 @@ impl AsyncBufRead for &[u8] {
}
impl<T: AsRef<[u8]> + Unpin> AsyncBufRead for io::Cursor<T> {
- fn poll_fill_buf<'a>(
- self: Pin<&'a mut Self>,
- _cx: &mut Context<'_>,
- ) -> Poll<io::Result<&'a [u8]>> {
+ fn poll_fill_buf(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
Poll::Ready(io::BufRead::fill_buf(self.get_mut()))
}
diff --git a/tokio-io/src/io/copy.rs b/tokio-io/src/io/copy.rs
index f363e308..688eb502 100644
--- a/tokio-io/src/io/copy.rs
+++ b/tokio-io/src/io/copy.rs
@@ -33,7 +33,7 @@ where
}
}
-impl<'a, R, W> Future for Copy<'a, R, W>
+impl<R, W> Future for Copy<'_, R, W>
where
R: AsyncRead + Unpin + ?Sized,
W: AsyncWrite + Unpin + ?Sized,
diff --git a/tokio-io/src/io/flush.rs b/tokio-io/src/io/flush.rs
index 6fef526b..6be90fcc 100644
--- a/tokio-io/src/io/flush.rs
+++ b/tokio-io/src/io/flush.rs
@@ -22,7 +22,7 @@ where
Flush { a }
}
-impl<'a, A> Unpin for Flush<'a, A> where A: Unpin + ?Sized {}
+impl<A> Unpin for Flush<'_, A> where A: Unpin + ?Sized {}
impl<A> Future for Flush<'_, A>
where
diff --git a/tokio-io/src/io/read.rs b/tokio-io/src/io/read.rs
index 449dac77..62f2fea0 100644
--- a/tokio-io/src/io/read.rs
+++ b/tokio-io/src/io/read.rs
@@ -29,7 +29,7 @@ pub struct Read<'a, R: ?Sized> {
}
// forward Unpin
-impl<'a, R: Unpin + ?Sized> Unpin for Read<'_, R> {}
+impl<R: Unpin + ?Sized> Unpin for Read<'_, R> {}
impl<R> Future for Read<'_, R>
where
diff --git a/tokio-io/src/io/read_exact.rs b/tokio-io/src/io/read_exact.rs
index 63006ab2..6a616b97 100644
--- a/tokio-io/src/io/read_exact.rs
+++ b/tokio-io/src/io/read_exact.rs
@@ -40,7 +40,7 @@ fn eof() -> io::Error {
}
// forward Unpin
-impl<'a, A: Unpin + ?Sized> Unpin for ReadExact<'_, A> {}
+impl<A: Unpin + ?Sized> Unpin for ReadExact<'_, A> {}
impl<A> Future for ReadExact<'_, A>
where
diff --git a/tokio-io/src/io/shutdown.rs b/tokio-io/src/io/shutdown.rs
index 4d01c46a..f22c6e55 100644
--- a/tokio-io/src/io/shutdown.rs
+++ b/tokio-io/src/io/shutdown.rs
@@ -22,7 +22,7 @@ where
Shutdown { a }
}
-impl<'a, A> Unpin for Shutdown<'a, A> where A: Unpin + ?Sized {}
+impl<A> Unpin for Shutdown<'_, A> where A: Unpin + ?Sized {}
impl<A> Future for Shutdown<'_, A>
where
diff --git a/tokio-io/src/io/write.rs b/tokio-io/src/io/write.rs
index 89ee86a3..1f27f605 100644
--- a/tokio-io/src/io/write.rs
+++ b/tokio-io/src/io/write.rs
@@ -22,7 +22,7 @@ where
}
// forward Unpin
-impl<'a, W: Unpin + ?Sized> Unpin for Write<'a, W> {}
+impl<W: Unpin + ?Sized> Unpin for Write<'_, W> {}
impl<W> Future for Write<'_, W>
where
diff --git a/tokio-process/src/kill.rs b/tokio-process/src/kill.rs
index 25d7d9a5..0f7bdcbb 100644
--- a/tokio-process/src/kill.rs
+++ b/tokio-process/src/kill.rs
@@ -6,7 +6,7 @@ pub(crate) trait Kill {
fn kill(&mut self) -> io::Result<()>;
}
-impl<'a, T: 'a + Kill> Kill for &'a mut T {
+impl<T: Kill> Kill for &mut T {
fn kill(&mut self) -> io::Result<()> {
(**self).kill()
}
diff --git a/tokio-process/src/unix/orphan.rs b/tokio-process/src/unix/orphan.rs
index 011cdfc7..b7064735 100644
--- a/tokio-process/src/unix/orphan.rs
+++ b/tokio-process/src/unix/orphan.rs
@@ -10,7 +10,7 @@ pub(crate) trait Wait {
fn try_wait(&mut self) -> io::Result<Option<ExitStatus>>;
}
-impl<'a, T: 'a + Wait> Wait for &'a mut T {
+impl<T: Wait> Wait for &mut T {
fn id(&self) -> u32 {
(**self).id()
}
@@ -29,7 +29,7 @@ pub(crate) trait OrphanQueue<T> {
fn reap_orphans(&self);
}
-impl<'a, T, O: 'a + OrphanQueue<T>> OrphanQueue<T> for &'a O {
+impl<T, O: OrphanQueue<T>> OrphanQueue<T> for &O {
fn push_orphan(&self, orphan: T) {
(**self).push_orphan(orphan);
}
diff --git a/tokio-signal/examples/multiple.rs b/tokio-signal/examples/multiple.rs
index c1ba96c2..5157fb1b 100644
--- a/tokio-signal/examples/multiple.rs
+++ b/tokio-signal/examples/multiple.rs
@@ -35,7 +35,6 @@ mod platform {
println!("received SIGTERM");
}
}
-
}
#[cfg(not(unix))]
diff --git a/tokio-sync/src/lock.rs b/tokio-sync/src/lock.rs
index addef25f..2c31dae3 100644
--- a/tokio-sync/src/lock.rs
+++ b/tokio-sync/src/lock.rs
@@ -111,7 +111,6 @@ impl<T> Lock<T> {
}
/// A future that resolves on acquiring the lock and returns the `LockGuard`.
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn lock(&mut self) -> LockGuard<T> {
poll_fn(|cx| self.poll_lock(cx)).await
}
diff --git a/tokio-sync/src/mpsc/bounded.rs b/tokio-sync/src/mpsc/bounded.rs
index 6c3a2fde..4f6f1ac6 100644
--- a/tokio-sync/src/mpsc/bounded.rs
+++ b/tokio-sync/src/mpsc/bounded.rs
@@ -167,7 +167,6 @@ impl<T> Receiver<T> {
/// assert_eq!(Some("world"), rx.recv().await);
/// }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn recv(&mut self) -> Option<T> {
use futures_util::future::poll_fn;
@@ -244,7 +243,6 @@ impl<T> Sender<T> {
/// }
/// }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn send(&mut self, value: T) -> Result<(), SendError> {
use futures_util::future::poll_fn;
diff --git a/tokio-sync/src/mpsc/unbounded.rs b/tokio-sync/src/mpsc/unbounded.rs
index 60694f15..2760b845 100644
--- a/tokio-sync/src/mpsc/unbounded.rs
+++ b/tokio-sync/src/mpsc/unbounded.rs
@@ -135,7 +135,6 @@ impl<T> UnboundedReceiver<T> {
/// assert_eq!(Some("world"), rx.recv().await);
/// }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn recv(&mut self) -> Option<T> {
use futures_util::future::poll_fn;
diff --git a/tokio-sync/src/oneshot.rs b/tokio-sync/src/oneshot.rs
index 7130118c..50176b3d 100644
--- a/tokio-sync/src/oneshot.rs
+++ b/tokio-sync/src/oneshot.rs
@@ -225,7 +225,6 @@ impl<T> Sender<T> {
/// println!("the receiver dropped");
/// }
/// ```
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
pub async fn closed(&mut self) {
use futures_util::future::poll_fn;
diff --git a/tokio-sync/src/task/atomic_waker.rs b/tokio-sync/src/task/atomic_waker.rs
index 6f741d38..4085bc0b 100644
--- a/tokio-sync/src/task/atomic_waker.rs
+++ b/tokio-sync/src/task/atomic_waker.rs
@@ -306,7 +306,7 @@ impl WakerRef for Waker {
}
}
-impl<'a> WakerRef for &'a Waker {
+impl WakerRef for &Waker {
fn wake(self) {
self.wake_by_ref()
}
diff --git a/tokio-sync/src/watch.rs b/tokio-sync/src/watch.rs
index 4fec6947..8067ed3b 100644
--- a/tokio-sync/src/watch.rs
+++ b/tokio-sync/src/watch.rs
@@ -249,8 +249,7 @@ impl<T> Receiver<T> {
///
/// Only the **most recent** value is returned. If the receiver is falling
/// behind the sender, intermediate values are dropped.
- #[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
- pub async fn recv_ref<'a>(&'a mut self) -> Option<Ref<'a, T>> {
+ pub async fn recv_ref(&mut self) -> Option<Ref<'_, T>> {
let shared = &self.shared;
let inner = &self.inner;
let version = self.ver;
@@ -296,7 +295,7 @@ impl<T: Clone> Receiver<T> {
///
/// This is equivalent to calling `clone()` on the value returned by
/// `recv()`.
- #[allow(clippy::needless_lifetimes, clippy::map_clone)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
+ #[allow(clippy::map_clone)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3274
pub async fn recv(&mut self) -> Option<T> {
self.recv_ref().await.map(|v_ref| v_ref.clone())
}
@@ -388,7 +387,6 @@ impl<T> Sender<T> {
///
/// This allows the producer to get notified when interest in the produced
<