ci: update nightly to 2023-10-21 (#6103)

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