Skip to content

Commit d9f9c56

Browse files
authored
chore: bump to newer nightly (#1426)
1 parent fff39c0 commit d9f9c56

File tree

44 files changed

+45
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+45
-89
lines changed

.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ task:
1414
- pkg install -y curl
1515
- curl https://sh.rustup.rs -sSf --output rustup.sh
1616
# TODO: switch back to nightly
17-
- sh rustup.sh -y --default-toolchain nightly-2019-07-17
17+
- sh rustup.sh -y --default-toolchain nightly-2019-08-10
1818
- . $HOME/.cargo/env
1919
- rustup target add i686-unknown-freebsd
2020
- |

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ trigger: ["master", "std-future"]
22
pr: ["master", "std-future"]
33

44
variables:
5-
nightly: nightly-2019-07-17
5+
nightly: nightly-2019-08-10
66
RUSTFLAGS: -Dwarnings
77

88
jobs:

ci/azure-install-rust.yml

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ steps:
2727
2828
# All platforms.
2929
- script: |
30-
rustup toolchain install nightly
31-
rustup update
3230
rustup toolchain list
3331
rustc -Vv
3432
cargo -V

rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2019-07-17
1+
nightly-2019-08-10

tokio-codec/src/framed.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,7 @@ impl<T: AsyncRead + Unpin, U: Unpin> AsyncRead for Fuse<T, U> {
234234
}
235235

236236
impl<T: AsyncBufRead + Unpin, U: Unpin> AsyncBufRead for Fuse<T, U> {
237-
fn poll_fill_buf<'a>(
238-
self: Pin<&'a mut Self>,
239-
cx: &mut Context<'_>,
240-
) -> Poll<io::Result<&'a [u8]>> {
237+
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
241238
pin!(self.get_mut().0).poll_fill_buf(cx)
242239
}
243240

tokio-codec/src/framed_write.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,7 @@ impl<T: AsyncRead + Unpin> AsyncRead for FramedWrite2<T> {
280280
}
281281

282282
impl<T: AsyncBufRead + Unpin> AsyncBufRead for FramedWrite2<T> {
283-
fn poll_fill_buf<'a>(
284-
self: Pin<&'a mut Self>,
285-
cx: &mut Context<'_>,
286-
) -> Poll<io::Result<&'a [u8]>> {
283+
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
287284
pin!(self.get_mut().inner).poll_fill_buf(cx)
288285
}
289286

tokio-codec/tests/framed_read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl AsyncRead for Mock {
284284
// TODO this newtype is necessary because `&[u8]` does not currently implement `AsyncRead`
285285
struct Slice<'a>(&'a [u8]);
286286

287-
impl<'a> AsyncRead for Slice<'a> {
287+
impl AsyncRead for Slice<'_> {
288288
fn poll_read(
289289
mut self: Pin<&mut Self>,
290290
cx: &mut Context<'_>,

tokio-current-thread/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl<P: Park + Default> Default for CurrentThread<P> {
429429

430430
// ===== impl Entered =====
431431

432-
impl<'a, P: Park> Entered<'a, P> {
432+
impl<P: Park> Entered<'_, P> {
433433
/// Spawn the future on the executor.
434434
///
435435
/// This internally queues the future to be executed once `run` is called.
@@ -593,7 +593,7 @@ impl<'a, P: Park> Entered<'a, P> {
593593
}
594594
}
595595

596-
impl<'a, P: Park> fmt::Debug for Entered<'a, P> {
596+
impl<P: Park> fmt::Debug for Entered<'_, P> {
597597
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
598598
fmt.debug_struct("Entered")
599599
.field("executor", &self.executor)
@@ -738,7 +738,7 @@ where
738738

739739
// ===== impl Borrow =====
740740

741-
impl<'a, U: Unpark> Borrow<'a, U> {
741+
impl<U: Unpark> Borrow<'_, U> {
742742
fn enter<F, R>(&mut self, f: F) -> R
743743
where
744744
F: FnOnce() -> R,
@@ -750,7 +750,7 @@ impl<'a, U: Unpark> Borrow<'a, U> {
750750
}
751751
}
752752

753-
impl<'a, U: Unpark> SpawnLocal for Borrow<'a, U> {
753+
impl<U: Unpark> SpawnLocal for Borrow<'_, U> {
754754
fn spawn_local(&mut self, future: Pin<Box<dyn Future<Output = ()>>>, already_counted: bool) {
755755
if !already_counted {
756756
// NOTE: we have a borrow of the Runtime, so we know that it isn't shut down.
@@ -770,7 +770,7 @@ impl CurrentRunner {
770770
{
771771
struct Reset<'a>(&'a CurrentRunner);
772772

773-
impl<'a> Drop for Reset<'a> {
773+
impl Drop for Reset<'_> {
774774
fn drop(&mut self) {
775775
self.0.spawn.set(None);
776776
self.0.id.set(None);

tokio-current-thread/src/scheduler.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ where
253253
node: Option<Arc<Node<U>>>,
254254
}
255255

256-
impl<'a, U: Unpark> Drop for Bomb<'a, U> {
256+
impl<U: Unpark> Drop for Bomb<'_, U> {
257257
fn drop(&mut self) {
258258
if let Some(node) = self.node.take() {
259259
self.borrow.enter(|| release_node(node))
@@ -329,7 +329,7 @@ where
329329
}
330330
}
331331

332-
impl<'a, U: Unpark> Scheduled<'a, U> {
332+
impl<U: Unpark> Scheduled<'_, U> {
333333
/// Polls the task, returns `true` if the task has completed.
334334
pub fn tick(&mut self) -> bool {
335335
let waker = unsafe {

tokio-current-thread/tests/current_thread.rs

-2
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ mod and_turn {
380380
},
381381
);
382382
}
383-
384383
}
385384

386385
mod in_drop {
@@ -441,7 +440,6 @@ mod in_drop {
441440
},
442441
);
443442
}
444-
445443
}
446444

447445
/*

tokio-executor/src/global.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ where
153153
// when leaving the scope. This handles cases that involve panicking.
154154
struct Reset<'a>(&'a Cell<State>, State);
155155

156-
impl<'a> Drop for Reset<'a> {
156+
impl Drop for Reset<'_> {
157157
fn drop(&mut self) {
158158
self.0.set(self.1);
159159
}

tokio-executor/tests/enter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(rust_2018_idioms)]
2-
#![feature(await_macro, async_await)]
2+
#![feature(async_await)]
33

44
#[test]
55
fn block_on_ready() {

tokio-executor/tests/executor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(rust_2018_idioms)]
2-
#![feature(await_macro, async_await)]
2+
#![feature(async_await)]
33

44
use tokio_executor::{self, DefaultExecutor};
55

tokio-fs/src/file.rs

-7
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ impl File {
184184
/// # Ok(())
185185
/// # }
186186
/// ```
187-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
188187
pub async fn seek(&mut self, pos: io::SeekFrom) -> io::Result<u64> {
189188
asyncify(|| self.std.seek(pos)).await
190189
}
@@ -209,7 +208,6 @@ impl File {
209208
/// # Ok(())
210209
/// # }
211210
/// ```
212-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
213211
pub async fn sync_all(&mut self) -> io::Result<()> {
214212
asyncify(|| self.std.sync_all()).await
215213
}
@@ -238,7 +236,6 @@ impl File {
238236
/// # Ok(())
239237
/// # }
240238
/// ```
241-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
242239
pub async fn sync_data(&mut self) -> io::Result<()> {
243240
asyncify(|| self.std.sync_data()).await
244241
}
@@ -270,7 +267,6 @@ impl File {
270267
/// # Ok(())
271268
/// # }
272269
/// ```
273-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
274270
pub async fn set_len(&mut self, size: u64) -> io::Result<()> {
275271
asyncify(|| self.std.set_len(size)).await
276272
}
@@ -292,7 +288,6 @@ impl File {
292288
/// # Ok(())
293289
/// # }
294290
/// ```
295-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
296291
pub async fn metadata(&self) -> io::Result<Metadata> {
297292
asyncify(|| self.std.metadata()).await
298293
}
@@ -314,7 +309,6 @@ impl File {
314309
/// # Ok(())
315310
/// # }
316311
/// ```
317-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
318312
pub async fn try_clone(&self) -> io::Result<File> {
319313
let std_file = asyncify(|| self.std.try_clone()).await?;
320314
Ok(File::from_std(std_file))
@@ -351,7 +345,6 @@ impl File {
351345
/// # Ok(())
352346
/// # }
353347
/// ```
354-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
355348
pub async fn set_permissions(&self, perm: Permissions) -> io::Result<()> {
356349
asyncify(|| self.std.set_permissions(perm)).await
357350
}

tokio-fs/src/open_options.rs

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ impl OpenOptions {
8989
/// Tokio runtime or if the underlying [`open`] call results in an error.
9090
///
9191
/// [`open`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.open
92-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
9392
pub async fn open<P>(&self, path: P) -> io::Result<File>
9493
where
9594
P: AsRef<Path> + Send + Unpin + 'static,

tokio-fs/src/read_dir.rs

-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ impl DirEntry {
182182
/// # Ok(())
183183
/// # }
184184
/// ```
185-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
186185
pub async fn metadata(&self) -> io::Result<Metadata> {
187186
asyncify(|| self.0.metadata()).await
188187
}
@@ -222,7 +221,6 @@ impl DirEntry {
222221
/// # Ok(())
223222
/// # }
224223
/// ```
225-
#[allow(clippy::needless_lifetimes)] // false positive: https://github.com/rust-lang/rust-clippy/issues/3988
226224
pub async fn file_type(&self) -> io::Result<FileType> {
227225
asyncify(|| self.0.file_type()).await
228226
}

tokio-io/src/async_buf_read.rs

+6-18
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ pub trait AsyncBufRead: AsyncRead {
3131
///
3232
/// [`poll_read`]: AsyncRead::poll_read
3333
/// [`consume`]: AsyncBufRead::consume
34-
fn poll_fill_buf<'a>(
35-
self: Pin<&'a mut Self>,
36-
cx: &mut Context<'_>,
37-
) -> Poll<io::Result<&'a [u8]>>;
34+
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>>;
3835

3936
/// Tells this buffer that `amt` bytes have been consumed from the buffer,
4037
/// so they should no longer be returned in calls to [`poll_read`].
@@ -56,8 +53,8 @@ pub trait AsyncBufRead: AsyncRead {
5653

5754
macro_rules! deref_async_buf_read {
5855
() => {
59-
fn poll_fill_buf<'a>(self: Pin<&'a mut Self>, cx: &mut Context<'_>)
60-
-> Poll<io::Result<&'a [u8]>>
56+
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>)
57+
-> Poll<io::Result<&[u8]>>
6158
{
6259
Pin::new(&mut **self.get_mut()).poll_fill_buf(cx)
6360
}
@@ -81,10 +78,7 @@ where
8178
P: DerefMut + Unpin,
8279
P::Target: AsyncBufRead,
8380
{
84-
fn poll_fill_buf<'a>(
85-
self: Pin<&'a mut Self>,
86-
cx: &mut Context<'_>,
87-
) -> Poll<io::Result<&'a [u8]>> {
81+
fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
8882
self.get_mut().as_mut().poll_fill_buf(cx)
8983
}
9084

@@ -94,10 +88,7 @@ where
9488
}
9589

9690
impl AsyncBufRead for &[u8] {
97-
fn poll_fill_buf<'a>(
98-
self: Pin<&'a mut Self>,
99-
_cx: &mut Context<'_>,
100-
) -> Poll<io::Result<&'a [u8]>> {
91+
fn poll_fill_buf(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
10192
Poll::Ready(Ok(*self))
10293
}
10394

@@ -107,10 +98,7 @@ impl AsyncBufRead for &[u8] {
10798
}
10899

109100
impl<T: AsRef<[u8]> + Unpin> AsyncBufRead for io::Cursor<T> {
110-
fn poll_fill_buf<'a>(
111-
self: Pin<&'a mut Self>,
112-
_cx: &mut Context<'_>,
113-
) -> Poll<io::Result<&'a [u8]>> {
101+
fn poll_fill_buf(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<&[u8]>> {
114102
Poll::Ready(io::BufRead::fill_buf(self.get_mut()))
115103
}
116104

tokio-io/src/io/copy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ where
3333
}
3434
}
3535

36-
impl<'a, R, W> Future for Copy<'a, R, W>
36+
impl<R, W> Future for Copy<'_, R, W>
3737
where
3838
R: AsyncRead + Unpin + ?Sized,
3939
W: AsyncWrite + Unpin + ?Sized,

tokio-io/src/io/flush.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ where
2222
Flush { a }
2323
}
2424

25-
impl<'a, A> Unpin for Flush<'a, A> where A: Unpin + ?Sized {}
25+
impl<A> Unpin for Flush<'_, A> where A: Unpin + ?Sized {}
2626

2727
impl<A> Future for Flush<'_, A>
2828
where

tokio-io/src/io/read.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub struct Read<'a, R: ?Sized> {
2929
}
3030

3131
// forward Unpin
32-
impl<'a, R: Unpin + ?Sized> Unpin for Read<'_, R> {}
32+
impl<R: Unpin + ?Sized> Unpin for Read<'_, R> {}
3333

3434
impl<R> Future for Read<'_, R>
3535
where

tokio-io/src/io/read_exact.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn eof() -> io::Error {
4040
}
4141

4242
// forward Unpin
43-
impl<'a, A: Unpin + ?Sized> Unpin for ReadExact<'_, A> {}
43+
impl<A: Unpin + ?Sized> Unpin for ReadExact<'_, A> {}
4444

4545
impl<A> Future for ReadExact<'_, A>
4646
where

tokio-io/src/io/shutdown.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ where
2222
Shutdown { a }
2323
}
2424

25-
impl<'a, A> Unpin for Shutdown<'a, A> where A: Unpin + ?Sized {}
25+
impl<A> Unpin for Shutdown<'_, A> where A: Unpin + ?Sized {}
2626

2727
impl<A> Future for Shutdown<'_, A>
2828
where

tokio-io/src/io/write.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ where
2222
}
2323

2424
// forward Unpin
25-
impl<'a, W: Unpin + ?Sized> Unpin for Write<'a, W> {}
25+
impl<W: Unpin + ?Sized> Unpin for Write<'_, W> {}
2626

2727
impl<W> Future for Write<'_, W>
2828
where

tokio-process/src/kill.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub(crate) trait Kill {
66
fn kill(&mut self) -> io::Result<()>;
77
}
88

9-
impl<'a, T: 'a + Kill> Kill for &'a mut T {
9+
impl<T: Kill> Kill for &mut T {
1010
fn kill(&mut self) -> io::Result<()> {
1111
(**self).kill()
1212
}

tokio-process/src/unix/orphan.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub(crate) trait Wait {
1010
fn try_wait(&mut self) -> io::Result<Option<ExitStatus>>;
1111
}
1212

13-
impl<'a, T: 'a + Wait> Wait for &'a mut T {
13+
impl<T: Wait> Wait for &mut T {
1414
fn id(&self) -> u32 {
1515
(**self).id()
1616
}
@@ -29,7 +29,7 @@ pub(crate) trait OrphanQueue<T> {
2929
fn reap_orphans(&self);
3030
}
3131

32-
impl<'a, T, O: 'a + OrphanQueue<T>> OrphanQueue<T> for &'a O {
32+
impl<T, O: OrphanQueue<T>> OrphanQueue<T> for &O {
3333
fn push_orphan(&self, orphan: T) {
3434
(**self).push_orphan(orphan);
3535
}

tokio-signal/examples/multiple.rs

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ mod platform {
3535
println!("received SIGTERM");
3636
}
3737
}
38-
3938
}
4039

4140
#[cfg(not(unix))]

0 commit comments

Comments
 (0)