mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
ci: update nightly to 2023-10-21 (#6103)
This commit is contained in:
parent
d22c549d97
commit
58acb56a17
@ -4,7 +4,7 @@ freebsd_instance:
|
||||
image_family: freebsd-13-1
|
||||
env:
|
||||
RUST_STABLE: stable
|
||||
RUST_NIGHTLY: nightly-2022-10-25
|
||||
RUST_NIGHTLY: nightly-2023-10-21
|
||||
RUSTFLAGS: -D warnings
|
||||
|
||||
# Test FreeBSD in a full VM on cirrus-ci.com. Test the i686 target too, in the
|
||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -15,7 +15,7 @@ env:
|
||||
RUST_BACKTRACE: 1
|
||||
# Change to specific Rust release to pin
|
||||
rust_stable: stable
|
||||
rust_nightly: nightly-2023-05-18
|
||||
rust_nightly: nightly-2023-10-21
|
||||
rust_clippy: 1.65.0
|
||||
# When updating this, also update:
|
||||
# - README.md
|
||||
|
@ -22,7 +22,7 @@ proc-macro = true
|
||||
[features]
|
||||
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0.7"
|
||||
proc-macro2 = "1.0.60"
|
||||
quote = "1"
|
||||
syn = { version = "2.0", features = ["full"] }
|
||||
|
||||
|
@ -848,8 +848,7 @@ pub trait StreamExt: Stream {
|
||||
///
|
||||
/// `collect` streams all values, awaiting as needed. Values are pushed into
|
||||
/// a collection. A number of different target collection types are
|
||||
/// supported, including [`Vec`](std::vec::Vec),
|
||||
/// [`String`](std::string::String), and [`Bytes`].
|
||||
/// supported, including [`Vec`], [`String`], and [`Bytes`].
|
||||
///
|
||||
/// [`Bytes`]: https://docs.rs/bytes/0.6.0/bytes/struct.Bytes.html
|
||||
///
|
||||
@ -1005,9 +1004,8 @@ pub trait StreamExt: Stream {
|
||||
|
||||
/// Applies a per-item timeout to the passed stream.
|
||||
///
|
||||
/// `timeout_repeating()` takes an [`Interval`](tokio::time::Interval) that
|
||||
/// controls the time each element of the stream has to complete before
|
||||
/// timing out.
|
||||
/// `timeout_repeating()` takes an [`Interval`] that controls the time each
|
||||
/// element of the stream has to complete before timing out.
|
||||
///
|
||||
/// If the wrapped stream yields a value before the deadline is reached, the
|
||||
/// value is returned. Otherwise, an error is returned. The caller may decide
|
||||
|
@ -26,7 +26,7 @@ pin_project! {
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert from a [`Stream`](crate::Stream).
|
||||
/// Convert from a [`Stream`].
|
||||
///
|
||||
/// This trait is not intended to be used directly. Instead, call
|
||||
/// [`StreamExt::collect()`](super::StreamExt::collect).
|
||||
|
@ -166,7 +166,7 @@ where
|
||||
B: Buf,
|
||||
E: Into<std::io::Error>,
|
||||
{
|
||||
/// Convert a stream of byte chunks into an [`AsyncRead`](tokio::io::AsyncRead).
|
||||
/// Convert a stream of byte chunks into an [`AsyncRead`].
|
||||
///
|
||||
/// The item should be a [`Result`] with the ok variant being something that
|
||||
/// implements the [`Buf`] trait (e.g. `Vec<u8>` or `Bytes`). The error
|
||||
|
@ -6,9 +6,7 @@ use std::path::{Path, PathBuf};
|
||||
/// Returns the canonical, absolute form of a path with all intermediate
|
||||
/// components normalized and symbolic links resolved.
|
||||
///
|
||||
/// This is an async version of [`std::fs::canonicalize`][std]
|
||||
///
|
||||
/// [std]: std::fs::canonicalize
|
||||
/// This is an async version of [`std::fs::canonicalize`].
|
||||
///
|
||||
/// # Platform-specific behavior
|
||||
///
|
||||
|
@ -5,9 +5,7 @@ use std::path::Path;
|
||||
/// of the original file to the destination file.
|
||||
/// This function will overwrite the contents of to.
|
||||
///
|
||||
/// This is the async equivalent of [`std::fs::copy`][std].
|
||||
///
|
||||
/// [std]: fn@std::fs::copy
|
||||
/// This is the async equivalent of [`std::fs::copy`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -5,9 +5,7 @@ use std::path::Path;
|
||||
|
||||
/// Creates a new, empty directory at the provided path.
|
||||
///
|
||||
/// This is an async version of [`std::fs::create_dir`][std]
|
||||
///
|
||||
/// [std]: std::fs::create_dir
|
||||
/// This is an async version of [`std::fs::create_dir`].
|
||||
///
|
||||
/// # Platform-specific behavior
|
||||
///
|
||||
|
@ -6,9 +6,7 @@ use std::path::Path;
|
||||
/// Recursively creates a directory and all of its parent components if they
|
||||
/// are missing.
|
||||
///
|
||||
/// This is an async version of [`std::fs::create_dir_all`][std]
|
||||
///
|
||||
/// [std]: std::fs::create_dir_all
|
||||
/// This is an async version of [`std::fs::create_dir_all`].
|
||||
///
|
||||
/// # Platform-specific behavior
|
||||
///
|
||||
|
@ -7,8 +7,6 @@ use std::path::Path;
|
||||
///
|
||||
/// This is a specialized version of [`std::fs::DirBuilder`] for usage on
|
||||
/// the Tokio runtime.
|
||||
///
|
||||
/// [std::fs::DirBuilder]: std::fs::DirBuilder
|
||||
#[derive(Debug, Default)]
|
||||
pub struct DirBuilder {
|
||||
/// Indicates whether to create parent directories if they are missing.
|
||||
@ -23,9 +21,7 @@ impl DirBuilder {
|
||||
/// Creates a new set of options with default mode/security settings for all
|
||||
/// platforms and also non-recursive.
|
||||
///
|
||||
/// This is an async version of [`std::fs::DirBuilder::new`][std]
|
||||
///
|
||||
/// [std]: std::fs::DirBuilder::new
|
||||
/// This is an async version of [`std::fs::DirBuilder::new`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -43,9 +39,7 @@ impl DirBuilder {
|
||||
///
|
||||
/// This option defaults to `false`.
|
||||
///
|
||||
/// This is an async version of [`std::fs::DirBuilder::recursive`][std]
|
||||
///
|
||||
/// [std]: std::fs::DirBuilder::recursive
|
||||
/// This is an async version of [`std::fs::DirBuilder::recursive`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -65,9 +59,7 @@ impl DirBuilder {
|
||||
/// It is considered an error if the directory already exists unless
|
||||
/// recursive mode is enabled.
|
||||
///
|
||||
/// This is an async version of [`std::fs::DirBuilder::create`][std]
|
||||
///
|
||||
/// [std]: std::fs::DirBuilder::create
|
||||
/// This is an async version of [`std::fs::DirBuilder::create`].
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
@ -32,7 +32,7 @@ use std::fs::File as StdFile;
|
||||
|
||||
/// A reference to an open file on the filesystem.
|
||||
///
|
||||
/// This is a specialized version of [`std::fs::File`][std] for usage from the
|
||||
/// This is a specialized version of [`std::fs::File`] for usage from the
|
||||
/// Tokio runtime.
|
||||
///
|
||||
/// An instance of a `File` can be read and/or written depending on what options
|
||||
@ -50,7 +50,6 @@ use std::fs::File as StdFile;
|
||||
/// Reading and writing to a `File` is usually done using the convenience
|
||||
/// methods found on the [`AsyncReadExt`] and [`AsyncWriteExt`] traits.
|
||||
///
|
||||
/// [std]: struct@std::fs::File
|
||||
/// [`AsyncSeek`]: trait@crate::io::AsyncSeek
|
||||
/// [`flush`]: fn@crate::io::AsyncWriteExt::flush
|
||||
/// [`sync_all`]: fn@crate::fs::File::sync_all
|
||||
@ -224,10 +223,7 @@ impl File {
|
||||
OpenOptions::new()
|
||||
}
|
||||
|
||||
/// Converts a [`std::fs::File`][std] to a [`tokio::fs::File`][file].
|
||||
///
|
||||
/// [std]: std::fs::File
|
||||
/// [file]: File
|
||||
/// Converts a [`std::fs::File`] to a [`tokio::fs::File`](File).
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@ -430,13 +426,11 @@ impl File {
|
||||
Ok(File::from_std(std_file))
|
||||
}
|
||||
|
||||
/// Destructures `File` into a [`std::fs::File`][std]. This function is
|
||||
/// Destructures `File` into a [`std::fs::File`]. This function is
|
||||
/// async to allow any in-flight operations to complete.
|
||||
///
|
||||
/// Use `File::try_into_std` to attempt conversion immediately.
|
||||
///
|
||||
/// [std]: std::fs::File
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```no_run
|
||||
@ -453,9 +447,7 @@ impl File {
|
||||
Arc::try_unwrap(self.std).expect("Arc::try_unwrap failed")
|
||||
}
|
||||
|
||||
/// Tries to immediately destructure `File` into a [`std::fs::File`][std].
|
||||
///
|
||||
/// [std]: std::fs::File
|
||||
/// Tries to immediately destructure `File` into a [`std::fs::File`].
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
@ -5,9 +5,7 @@ use std::path::Path;
|
||||
|
||||
/// Creates a new hard link on the filesystem.
|
||||
///
|
||||
/// This is an async version of [`std::fs::hard_link`][std]
|
||||
///
|
||||
/// [std]: std::fs::hard_link
|
||||
/// This is an async version of [`std::fs::hard_link`].
|
||||
///
|
||||
/// The `dst` path will be a link pointing to the `src` path. Note that systems
|
||||
/// often require these two paths to both be located on the same filesystem.
|
||||
|
@ -7,7 +7,7 @@ use std::path::Path;
|
||||
/// Given a path, queries the file system to get information about a file,
|
||||
/// directory, etc.
|
||||
///
|
||||
/// This is an async version of [`std::fs::metadata`][std]
|
||||
/// This is an async version of [`std::fs::metadata`].
|
||||
///
|
||||
/// This function will traverse symbolic links to query information about the
|
||||
/// destination file.
|
||||
@ -18,7 +18,6 @@ use std::path::Path;
|
||||
/// `GetFileAttributesEx` function on Windows. Note that, this [may change in
|
||||
/// the future][changes].
|
||||
///
|
||||
/// [std]: std::fs::metadata
|
||||
/// [changes]: https://doc.rust-lang.org/std/io/index.html#platform-specific-behavior
|
||||
///
|
||||
/// # Errors
|
||||
|
@ -25,7 +25,7 @@ use std::os::windows::fs::OpenOptionsExt;
|
||||
/// Generally speaking, when using `OpenOptions`, you'll first call [`new`],
|
||||
/// then chain calls to methods to set each option, then call [`open`], passing
|
||||
/// the path of the file you're trying to open. This will give you a
|
||||
/// [`io::Result`][result] with a [`File`] inside that you can further operate
|
||||
/// [`io::Result`] with a [`File`] inside that you can further operate
|
||||
/// on.
|
||||
///
|
||||
/// This is a specialized version of [`std::fs::OpenOptions`] for usage from
|
||||
@ -36,11 +36,9 @@ use std::os::windows::fs::OpenOptionsExt;
|
||||
///
|
||||
/// [`new`]: OpenOptions::new
|
||||
/// [`open`]: OpenOptions::open
|
||||
/// [result]: std::io::Result
|
||||
/// [`File`]: File
|
||||
/// [`File::open`]: File::open
|
||||
/// [`File::create`]: File::create
|
||||
/// [`std::fs::OpenOptions`]: std::fs::OpenOptions
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
@ -4,9 +4,7 @@ use std::{io, path::Path};
|
||||
|
||||
/// Reads the entire contents of a file into a bytes vector.
|
||||
///
|
||||
/// This is an async version of [`std::fs::read`][std]
|
||||
///
|
||||
/// [std]: std::fs::read
|
||||
/// This is an async version of [`std::fs::read`].
|
||||
///
|
||||
/// This is a convenience function for using [`File::open`] and [`read_to_end`]
|
||||
/// with fewer imports and without an intermediate variable. It pre-allocates a
|
||||
|
@ -24,7 +24,7 @@ const CHUNK_SIZE: usize = 32;
|
||||
|
||||
/// Returns a stream over the entries within a directory.
|
||||
///
|
||||
/// This is an async version of [`std::fs::read_dir`](std::fs::read_dir)
|
||||
/// This is an async version of [`std::fs::read_dir`].
|
||||
///
|
||||
/// This operation is implemented by running the equivalent blocking
|
||||
/// operation on a separate thread pool using [`spawn_blocking`].
|
||||
|
@ -5,9 +5,7 @@ use std::path::{Path, PathBuf};
|
||||
|
||||
/// Reads a symbolic link, returning the file that the link points to.
|
||||
///
|
||||
/// This is an async version of [`std::fs::read_link`][std]
|
||||
///
|
||||
/// [std]: std::fs::read_link
|
||||
/// This is an async version of [`std::fs::read_link`].
|
||||
pub async fn read_link(path: impl AsRef<Path>) -> io::Result<PathBuf> {
|
||||
let path = path.as_ref().to_owned();
|
||||
asyncify(move || std::fs::read_link(path)).await
|
||||
|
@ -5,7 +5,7 @@ use std::path::Path;
|
||||
|
||||
/// Removes an existing, empty directory.
|
||||
///
|
||||
/// This is an async version of [`std::fs::remove_dir`](std::fs::remove_dir)
|
||||
/// This is an async version of [`std::fs::remove_dir`].
|
||||
pub async fn remove_dir(path: impl AsRef<Path>) -> io::Result<()> {
|
||||
let path = path.as_ref().to_owned();
|
||||
asyncify(move || std::fs::remove_dir(path)).await
|
||||
|
@ -9,9 +9,7 @@ use std::path::Path;
|
||||
/// depending on platform, other open file descriptors may prevent immediate
|
||||
/// removal).
|
||||
///
|
||||
/// This is an async version of [`std::fs::remove_file`][std]
|
||||
///
|
||||
/// [std]: std::fs::remove_file
|
||||
/// This is an async version of [`std::fs::remove_file`].
|
||||
pub async fn remove_file(path: impl AsRef<Path>) -> io::Result<()> {
|
||||
let path = path.as_ref().to_owned();
|
||||
asyncify(move || std::fs::remove_file(path)).await
|
||||
|
@ -8,7 +8,7 @@ use std::path::Path;
|
||||
///
|
||||
/// This will not work if the new name is on a different mount point.
|
||||
///
|
||||
/// This is an async version of [`std::fs::rename`](std::fs::rename)
|
||||
/// This is an async version of [`std::fs::rename`].
|
||||
pub async fn rename(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()> {
|
||||
let from = from.as_ref().to_owned();
|
||||
let to = to.as_ref().to_owned();
|
||||
|
@ -7,9 +7,7 @@ use std::path::Path;
|
||||
///
|
||||
/// The `dst` path will be a symbolic link pointing to the `src` path.
|
||||
///
|
||||
/// This is an async version of [`std::os::unix::fs::symlink`][std]
|
||||
///
|
||||
/// [std]: std::os::unix::fs::symlink
|
||||
/// This is an async version of [`std::os::unix::fs::symlink`].
|
||||
pub async fn symlink(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> io::Result<()> {
|
||||
let src = src.as_ref().to_owned();
|
||||
let dst = dst.as_ref().to_owned();
|
||||
|
@ -179,7 +179,7 @@ mod harness;
|
||||
use self::harness::Harness;
|
||||
|
||||
mod id;
|
||||
#[cfg_attr(not(tokio_unstable), allow(unreachable_pub))]
|
||||
#[cfg_attr(not(tokio_unstable), allow(unreachable_pub, unused_imports))]
|
||||
pub use id::{id, try_id, Id};
|
||||
|
||||
#[cfg(feature = "rt")]
|
||||
|
@ -13,7 +13,7 @@ use std::task::{Context, Poll};
|
||||
|
||||
/// Sends values to the associated `Receiver`.
|
||||
///
|
||||
/// Instances are created by the [`channel`](channel) function.
|
||||
/// Instances are created by the [`channel`] function.
|
||||
///
|
||||
/// To convert the `Sender` into a `Sink` or use it in a poll function, you can
|
||||
/// use the [`PollSender`] utility.
|
||||
@ -86,7 +86,7 @@ pub struct OwnedPermit<T> {
|
||||
|
||||
/// Receives values from the associated `Sender`.
|
||||
///
|
||||
/// Instances are created by the [`channel`](channel) function.
|
||||
/// Instances are created by the [`channel`] function.
|
||||
///
|
||||
/// This receiver can be turned into a `Stream` using [`ReceiverStream`].
|
||||
///
|
||||
|
@ -7,8 +7,7 @@ use std::task::{Context, Poll};
|
||||
|
||||
/// Send values to the associated `UnboundedReceiver`.
|
||||
///
|
||||
/// Instances are created by the
|
||||
/// [`unbounded_channel`](unbounded_channel) function.
|
||||
/// Instances are created by the [`unbounded_channel`] function.
|
||||
pub struct UnboundedSender<T> {
|
||||
chan: chan::Tx<T, Semaphore>,
|
||||
}
|
||||
@ -65,8 +64,7 @@ impl<T> fmt::Debug for UnboundedSender<T> {
|
||||
|
||||
/// Receive values from the associated `UnboundedSender`.
|
||||
///
|
||||
/// Instances are created by the
|
||||
/// [`unbounded_channel`](unbounded_channel) function.
|
||||
/// Instances are created by the [`unbounded_channel`] function.
|
||||
///
|
||||
/// This receiver can be turned into a `Stream` using [`UnboundedReceiverStream`].
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user