diff options
| author | bors <bors@rust-lang.org> | 2019-12-28 00:18:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-12-28 00:18:59 +0000 |
| commit | 3a087ad3a924be12343bb035bf9b63ed81f650bf (patch) | |
| tree | 280371e5569301f96fa6ed0a2498625a90795e28 /src/libstd | |
| parent | 74c4e6a981d3150db8444c8d250e50bbe6b93b6b (diff) | |
| parent | 65bbcf0e13d0ce81f443b2fcfc5548b589c8462e (diff) | |
| download | rust-3a087ad3a924be12343bb035bf9b63ed81f650bf.tar.gz rust-3a087ad3a924be12343bb035bf9b63ed81f650bf.zip | |
Auto merge of #67670 - oli-obk:rollup-2dp08sd, r=oli-obk
Rollup of 15 pull requests Successful merges: - #65244 (add IntoFuture trait and support for await) - #67576 (reuse `capacity` variable in slice::repeat) - #67588 (Use NonNull in slice::Iter and slice::IterMut.) - #67594 (Update libc to 0.2.66) - #67602 (Use issue = "none" instead of "0" in intrinsics) - #67604 (Add Scalar::to_(u|i)16 methods) - #67617 (Remove `compiler_builtins_lib` documentation) - #67621 (Use the correct type for static qualifs) - #67629 (Remove redundant link texts) - #67632 (Convert collapsed to shortcut reference links) - #67633 (Update .mailmap) - #67635 (Document safety of Path casting) - #67654 (Add regression test for old NLL ICE) - #67659 (Stabilize the `matches!` macro) - #67664 (Fix some mailmap entries) Failed merges: r? @ghost
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 2 | ||||
| -rw-r--r-- | src/libstd/collections/hash/set.rs | 2 | ||||
| -rw-r--r-- | src/libstd/future.rs | 6 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 2 | ||||
| -rw-r--r-- | src/libstd/path.rs | 9 | ||||
| -rw-r--r-- | src/libstd/sync/mpsc/mod.rs | 10 | ||||
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 2 |
7 files changed, 22 insertions, 11 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index a928867d9de..fdc587ba5da 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -1076,7 +1076,7 @@ impl<'a, K, V> IterMut<'a, K, V> { /// An owning iterator over the entries of a `HashMap`. /// -/// This `struct` is created by the [`into_iter`] method on [`HashMap`][`HashMap`] +/// This `struct` is created by the [`into_iter`] method on [`HashMap`] /// (provided by the `IntoIterator` trait). See its documentation for more. /// /// [`into_iter`]: struct.HashMap.html#method.into_iter diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index fff64e9fc90..566e5146cf8 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -1101,7 +1101,7 @@ pub struct Iter<'a, K: 'a> { /// An owning iterator over the items of a `HashSet`. /// -/// This `struct` is created by the [`into_iter`] method on [`HashSet`][`HashSet`] +/// This `struct` is created by the [`into_iter`] method on [`HashSet`] /// (provided by the `IntoIterator` trait). See its documentation for more. /// /// [`HashSet`]: struct.HashSet.html diff --git a/src/libstd/future.rs b/src/libstd/future.rs index 9c7422c2b20..908736c6393 100644 --- a/src/libstd/future.rs +++ b/src/libstd/future.rs @@ -10,7 +10,11 @@ use core::task::{Context, Poll}; #[doc(inline)] #[stable(feature = "futures_api", since = "1.36.0")] -pub use core::future::*; +pub use core::future::Future; + +#[doc(inline)] +#[unstable(feature = "into_future", issue = "67644")] +pub use core::future::IntoFuture; /// Wrap a generator in a future. /// diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 9e9df5ab9b6..930bf397bc4 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -269,6 +269,7 @@ #![feature(hashmap_internals)] #![feature(int_error_internals)] #![feature(int_error_matching)] +#![feature(into_future)] #![feature(integer_atomics)] #![feature(lang_items)] #![feature(libc)] @@ -276,7 +277,6 @@ #![feature(linkage)] #![feature(log_syntax)] #![feature(manually_drop_take)] -#![feature(matches_macro)] #![feature(maybe_uninit_ref)] #![feature(maybe_uninit_slice)] #![feature(needs_panic_runtime)] diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 580ff1610ac..f308d511cf8 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -2,7 +2,7 @@ //! Cross-platform path manipulation. //! -//! This module provides two types, [`PathBuf`] and [`Path`][`Path`] (akin to [`String`] +//! This module provides two types, [`PathBuf`] and [`Path`] (akin to [`String`] //! and [`str`]), for working with paths abstractly. These types are thin wrappers //! around [`OsString`] and [`OsStr`] respectively, meaning that they work directly //! on strings according to the local platform's path syntax. @@ -296,6 +296,13 @@ where } // See note at the top of this module to understand why these are used: +// +// These casts are safe as OsStr is internally a wrapper around [u8] on all +// platforms. +// +// Note that currently this relies on the special knowledge that libstd has; +// these types are single-element structs but are not marked repr(transparent) +// or repr(C) which would make these casts allowable outside std. fn os_str_as_u8_slice(s: &OsStr) -> &[u8] { unsafe { &*(s as *const OsStr as *const [u8]) } } diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs index 0e334c191e7..e70204d6839 100644 --- a/src/libstd/sync/mpsc/mod.rs +++ b/src/libstd/sync/mpsc/mod.rs @@ -286,7 +286,7 @@ mod sync; mod cache_aligned; -/// The receiving half of Rust's [`channel`][] (or [`sync_channel`]) type. +/// The receiving half of Rust's [`channel`] (or [`sync_channel`]) type. /// This half can only be owned by one thread. /// /// Messages sent to the channel can be retrieved using [`recv`]. @@ -558,7 +558,7 @@ pub struct SendError<T>(#[stable(feature = "rust1", since = "1.0.0")] pub T); /// An error returned from the [`recv`] function on a [`Receiver`]. /// /// The [`recv`] operation can only fail if the sending half of a -/// [`channel`][`channel`] (or [`sync_channel`]) is disconnected, implying that no further +/// [`channel`] (or [`sync_channel`]) is disconnected, implying that no further /// messages will ever be received. /// /// [`recv`]: struct.Receiver.html#method.recv @@ -1108,7 +1108,7 @@ impl<T> Receiver<T> { /// /// This function will always block the current thread if there is no data /// available and it's possible for more data to be sent. Once a message is - /// sent to the corresponding [`Sender`][] (or [`SyncSender`]), then this + /// sent to the corresponding [`Sender`] (or [`SyncSender`]), then this /// receiver will wake up and return that message. /// /// If the corresponding [`Sender`] has disconnected, or it disconnects while @@ -1194,7 +1194,7 @@ impl<T> Receiver<T> { /// /// This function will always block the current thread if there is no data /// available and it's possible for more data to be sent. Once a message is - /// sent to the corresponding [`Sender`][] (or [`SyncSender`]), then this + /// sent to the corresponding [`Sender`] (or [`SyncSender`]), then this /// receiver will wake up and return that message. /// /// If the corresponding [`Sender`] has disconnected, or it disconnects while @@ -1295,7 +1295,7 @@ impl<T> Receiver<T> { /// /// This function will always block the current thread if there is no data /// available and it's possible for more data to be sent. Once a message is - /// sent to the corresponding [`Sender`][] (or [`SyncSender`]), then this + /// sent to the corresponding [`Sender`] (or [`SyncSender`]), then this /// receiver will wake up and return that message. /// /// If the corresponding [`Sender`] has disconnected, or it disconnects while diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 2ff36133a7c..fdd29af8581 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -25,7 +25,7 @@ use crate::sys_common::rwlock as sys; /// The type parameter `T` represents the data that this lock protects. It is /// required that `T` satisfies [`Send`] to be shared across threads and /// [`Sync`] to allow concurrent access through readers. The RAII guards -/// returned from the locking methods implement [`Deref`][] (and [`DerefMut`] +/// returned from the locking methods implement [`Deref`] (and [`DerefMut`] /// for the `write` methods) to allow access to the content of the lock. /// /// # Poisoning |
