mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
ci: update nightly and fix all sorts of new failures (#2852)
* ci: update miri flags * ci: fix doc warnings * doc: fix some links Cherry-pick of18ed761from #2834 * ci: cherry-pick00a2849From: #2793 * ci: cherry-pick6b61212From: #2793 Co-authored-by: Blas Rodriguez Irizar <[email protected]>
This commit is contained in:
co-authored by
Blas Rodriguez Irizar
parent
f0328f7810
commit
2b96b1773d
@@ -9,7 +9,7 @@ name: CI
|
|||||||
env:
|
env:
|
||||||
RUSTFLAGS: -Dwarnings
|
RUSTFLAGS: -Dwarnings
|
||||||
RUST_BACKTRACE: 1
|
RUST_BACKTRACE: 1
|
||||||
nightly: nightly-2020-07-12
|
nightly: nightly-2020-09-21
|
||||||
minrust: 1.39.0
|
minrust: 1.39.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -110,7 +110,7 @@ jobs:
|
|||||||
rm -rf tokio/tests
|
rm -rf tokio/tests
|
||||||
|
|
||||||
- name: miri
|
- name: miri
|
||||||
run: cargo miri test --features rt-core,rt-threaded,rt-util,sync -- -- task
|
run: cargo miri test --features rt-core,rt-threaded,rt-util,sync task
|
||||||
working-directory: tokio
|
working-directory: tokio
|
||||||
|
|
||||||
cross:
|
cross:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
rust_2018_idioms,
|
rust_2018_idioms,
|
||||||
unreachable_pub
|
unreachable_pub
|
||||||
)]
|
)]
|
||||||
#![deny(intra_doc_link_resolution_failure)]
|
#![cfg_attr(docsrs, deny(broken_intra_doc_links))]
|
||||||
#![doc(test(
|
#![doc(test(
|
||||||
no_crate_inject,
|
no_crate_inject,
|
||||||
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
rust_2018_idioms,
|
rust_2018_idioms,
|
||||||
unreachable_pub
|
unreachable_pub
|
||||||
)]
|
)]
|
||||||
#![deny(intra_doc_link_resolution_failure)]
|
#![cfg_attr(docsrs, deny(broken_intra_doc_links))]
|
||||||
#![doc(test(
|
#![doc(test(
|
||||||
no_crate_inject,
|
no_crate_inject,
|
||||||
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
rust_2018_idioms,
|
rust_2018_idioms,
|
||||||
unreachable_pub
|
unreachable_pub
|
||||||
)]
|
)]
|
||||||
#![deny(intra_doc_link_resolution_failure)]
|
#![cfg_attr(docsrs, deny(broken_intra_doc_links))]
|
||||||
#![doc(test(
|
#![doc(test(
|
||||||
no_crate_inject,
|
no_crate_inject,
|
||||||
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
||||||
|
|||||||
@@ -1067,7 +1067,7 @@ cfg_io_util! {
|
|||||||
/// (See also the [`crate::fs::read_to_string`] convenience function for
|
/// (See also the [`crate::fs::read_to_string`] convenience function for
|
||||||
/// reading from a file.)
|
/// reading from a file.)
|
||||||
///
|
///
|
||||||
/// [`crate::fs::read_to_string`]: crate::fs::read_to_string::read_to_string
|
/// [`crate::fs::read_to_string`]: fn@crate::fs::read_to_string
|
||||||
fn read_to_string<'a>(&'a mut self, dst: &'a mut String) -> ReadToString<'a, Self>
|
fn read_to_string<'a>(&'a mut self, dst: &'a mut String) -> ReadToString<'a, Self>
|
||||||
where
|
where
|
||||||
Self: Unpin,
|
Self: Unpin,
|
||||||
|
|||||||
+1
-2
@@ -10,13 +10,12 @@
|
|||||||
rust_2018_idioms,
|
rust_2018_idioms,
|
||||||
unreachable_pub
|
unreachable_pub
|
||||||
)]
|
)]
|
||||||
#![deny(intra_doc_link_resolution_failure)]
|
#![cfg_attr(docsrs, deny(broken_intra_doc_links))]
|
||||||
#![doc(test(
|
#![doc(test(
|
||||||
no_crate_inject,
|
no_crate_inject,
|
||||||
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
||||||
))]
|
))]
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||||
#![cfg_attr(docsrs, feature(doc_alias))]
|
|
||||||
|
|
||||||
//! A runtime for writing reliable, asynchronous, and slim applications.
|
//! A runtime for writing reliable, asynchronous, and slim applications.
|
||||||
//!
|
//!
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ impl UdpSocket {
|
|||||||
/// should ensure that when the remote cannot receive, the
|
/// should ensure that when the remote cannot receive, the
|
||||||
/// [`ErrorKind::WouldBlock`] is properly handled.
|
/// [`ErrorKind::WouldBlock`] is properly handled.
|
||||||
///
|
///
|
||||||
/// [`ErrorKind::WouldBlock`]: std::io::error::ErrorKind::WouldBlock
|
/// [`ErrorKind::WouldBlock`]: std::io::ErrorKind::WouldBlock
|
||||||
pub fn try_send(&self, buf: &[u8]) -> io::Result<usize> {
|
pub fn try_send(&self, buf: &[u8]) -> io::Result<usize> {
|
||||||
self.io.get_ref().send(buf)
|
self.io.get_ref().send(buf)
|
||||||
}
|
}
|
||||||
@@ -209,7 +209,7 @@ impl UdpSocket {
|
|||||||
/// [`ErrorKind::WouldBlock`] is properly handled. An error can also occur
|
/// [`ErrorKind::WouldBlock`] is properly handled. An error can also occur
|
||||||
/// if the IP version of the socket does not match that of `target`.
|
/// if the IP version of the socket does not match that of `target`.
|
||||||
///
|
///
|
||||||
/// [`ErrorKind::WouldBlock`]: std::io::error::ErrorKind::WouldBlock
|
/// [`ErrorKind::WouldBlock`]: std::io::ErrorKind::WouldBlock
|
||||||
pub fn try_send_to(&self, buf: &[u8], target: SocketAddr) -> io::Result<usize> {
|
pub fn try_send_to(&self, buf: &[u8], target: SocketAddr) -> io::Result<usize> {
|
||||||
self.io.get_ref().send_to(buf, &target)
|
self.io.get_ref().send_to(buf, &target)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -399,8 +399,8 @@
|
|||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! [`watch` channel]: crate::sync::watch
|
//! [`watch` channel]: mod@crate::sync::watch
|
||||||
//! [`broadcast` channel]: crate::sync::broadcast
|
//! [`broadcast` channel]: mod@crate::sync::broadcast
|
||||||
//!
|
//!
|
||||||
//! # State synchronization
|
//! # State synchronization
|
||||||
//!
|
//!
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ use std::task::{self, Poll};
|
|||||||
/// which it should be yielded back.
|
/// which it should be yielded back.
|
||||||
///
|
///
|
||||||
/// Once delays have been configured, the `DelayQueue` is used via its
|
/// Once delays have been configured, the `DelayQueue` is used via its
|
||||||
/// [`Stream`] implementation. [`poll`] is called. If an entry has reached its
|
/// [`Stream`] implementation. [`poll_expired`] is called. If an entry has reached its
|
||||||
/// deadline, it is returned. If not, `Poll::Pending` indicating that the
|
/// deadline, it is returned. If not, `Poll::Pending` indicating that the
|
||||||
/// current task will be notified once the deadline has been reached.
|
/// current task will be notified once the deadline has been reached.
|
||||||
///
|
///
|
||||||
/// # `Stream` implementation
|
/// # `Stream` implementation
|
||||||
///
|
///
|
||||||
/// Items are retrieved from the queue via [`Stream::poll`]. If no delays have
|
/// Items are retrieved from the queue via [`DelayQueue::poll_expired`]. If no delays have
|
||||||
/// expired, no items are returned. In this case, `NotReady` is returned and the
|
/// expired, no items are returned. In this case, `NotReady` is returned and the
|
||||||
/// current task is registered to be notified once the next item's delay has
|
/// current task is registered to be notified once the next item's delay has
|
||||||
/// expired.
|
/// expired.
|
||||||
@@ -115,8 +115,8 @@ use std::task::{self, Poll};
|
|||||||
/// [`insert_at`]: method@Self::insert_at
|
/// [`insert_at`]: method@Self::insert_at
|
||||||
/// [`Key`]: struct@Key
|
/// [`Key`]: struct@Key
|
||||||
/// [`Stream`]: https://docs.rs/futures/0.1/futures/stream/trait.Stream.html
|
/// [`Stream`]: https://docs.rs/futures/0.1/futures/stream/trait.Stream.html
|
||||||
/// [`poll`]: method@Self::poll
|
/// [`poll_expired`]: method@Self::poll_expired
|
||||||
/// [`Stream::poll`]: method@Self::poll
|
/// [`Stream::poll_expired`]: method@Self::poll_expired
|
||||||
/// [`DelayQueue`]: struct@DelayQueue
|
/// [`DelayQueue`]: struct@DelayQueue
|
||||||
/// [`delay_for`]: fn@super::delay_for
|
/// [`delay_for`]: fn@super::delay_for
|
||||||
/// [`slab`]: slab
|
/// [`slab`]: slab
|
||||||
@@ -146,9 +146,9 @@ pub struct DelayQueue<T> {
|
|||||||
|
|
||||||
/// An entry in `DelayQueue` that has expired and removed.
|
/// An entry in `DelayQueue` that has expired and removed.
|
||||||
///
|
///
|
||||||
/// Values are returned by [`DelayQueue::poll`].
|
/// Values are returned by [`DelayQueue::poll_expired`].
|
||||||
///
|
///
|
||||||
/// [`DelayQueue::poll`]: method@DelayQueue::poll
|
/// [`DelayQueue::poll_expired`]: method@DelayQueue::poll_expired
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Expired<T> {
|
pub struct Expired<T> {
|
||||||
/// The data stored in the queue
|
/// The data stored in the queue
|
||||||
@@ -260,12 +260,12 @@ impl<T> DelayQueue<T> {
|
|||||||
/// of a `Duration`.
|
/// of a `Duration`.
|
||||||
///
|
///
|
||||||
/// `value` is stored in the queue until `when` is reached. At which point,
|
/// `value` is stored in the queue until `when` is reached. At which point,
|
||||||
/// `value` will be returned from [`poll`]. If `when` has already been
|
/// `value` will be returned from [`poll_expired`]. If `when` has already been
|
||||||
/// reached, then `value` is immediately made available to poll.
|
/// reached, then `value` is immediately made available to poll.
|
||||||
///
|
///
|
||||||
/// The return value represents the insertion and is used at an argument to
|
/// The return value represents the insertion and is used at an argument to
|
||||||
/// [`remove`] and [`reset`]. Note that [`Key`] is token and is reused once
|
/// [`remove`] and [`reset`]. Note that [`Key`] is token and is reused once
|
||||||
/// `value` is removed from the queue either by calling [`poll`] after
|
/// `value` is removed from the queue either by calling [`poll_expired`] after
|
||||||
/// `when` is reached or by calling [`remove`]. At this point, the caller
|
/// `when` is reached or by calling [`remove`]. At this point, the caller
|
||||||
/// must take care to not use the returned [`Key`] again as it may reference
|
/// must take care to not use the returned [`Key`] again as it may reference
|
||||||
/// a different item in the queue.
|
/// a different item in the queue.
|
||||||
@@ -295,7 +295,7 @@ impl<T> DelayQueue<T> {
|
|||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [`poll`]: method@Self::poll
|
/// [`poll_expired`]: method@Self::poll_expired
|
||||||
/// [`remove`]: method@Self::remove
|
/// [`remove`]: method@Self::remove
|
||||||
/// [`reset`]: method@Self::reset
|
/// [`reset`]: method@Self::reset
|
||||||
/// [`Key`]: struct@Key
|
/// [`Key`]: struct@Key
|
||||||
@@ -367,12 +367,12 @@ impl<T> DelayQueue<T> {
|
|||||||
/// instead of an `Instant`.
|
/// instead of an `Instant`.
|
||||||
///
|
///
|
||||||
/// `value` is stored in the queue until `when` is reached. At which point,
|
/// `value` is stored in the queue until `when` is reached. At which point,
|
||||||
/// `value` will be returned from [`poll`]. If `when` has already been
|
/// `value` will be returned from [`poll_expired`]. If `when` has already been
|
||||||
/// reached, then `value` is immediately made available to poll.
|
/// reached, then `value` is immediately made available to poll.
|
||||||
///
|
///
|
||||||
/// The return value represents the insertion and is used at an argument to
|
/// The return value represents the insertion and is used at an argument to
|
||||||
/// [`remove`] and [`reset`]. Note that [`Key`] is token and is reused once
|
/// [`remove`] and [`reset`]. Note that [`Key`] is token and is reused once
|
||||||
/// `value` is removed from the queue either by calling [`poll`] after
|
/// `value` is removed from the queue either by calling [`poll_expired`] after
|
||||||
/// `when` is reached or by calling [`remove`]. At this point, the caller
|
/// `when` is reached or by calling [`remove`]. At this point, the caller
|
||||||
/// must take care to not use the returned [`Key`] again as it may reference
|
/// must take care to not use the returned [`Key`] again as it may reference
|
||||||
/// a different item in the queue.
|
/// a different item in the queue.
|
||||||
@@ -403,7 +403,7 @@ impl<T> DelayQueue<T> {
|
|||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [`poll`]: method@Self::poll
|
/// [`poll_expired`]: method@Self::poll_expired
|
||||||
/// [`remove`]: method@Self::remove
|
/// [`remove`]: method@Self::remove
|
||||||
/// [`reset`]: method@Self::reset
|
/// [`reset`]: method@Self::reset
|
||||||
/// [`Key`]: struct@Key
|
/// [`Key`]: struct@Key
|
||||||
@@ -578,11 +578,11 @@ impl<T> DelayQueue<T> {
|
|||||||
|
|
||||||
/// Clears the queue, removing all items.
|
/// Clears the queue, removing all items.
|
||||||
///
|
///
|
||||||
/// After calling `clear`, [`poll`] will return `Ok(Ready(None))`.
|
/// After calling `clear`, [`poll_expired`] will return `Ok(Ready(None))`.
|
||||||
///
|
///
|
||||||
/// Note that this method has no effect on the allocated capacity.
|
/// Note that this method has no effect on the allocated capacity.
|
||||||
///
|
///
|
||||||
/// [`poll`]: method@Self::poll
|
/// [`poll_expired`]: method@Self::poll_expired
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user