Skip to content

Commit

Permalink
Auto merge of #76090 - Dylan-DPC:rollup-eksndcr, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Rollup of 14 pull requests

Successful merges:

 - #75832 (Move to intra-doc links for wasi/ext/fs.rs, os_str_bytes.rs…)
 - #75852 (Switch to intra-doc links in `core::hash`)
 - #75874 (Shorten liballoc doc intra link while readable)
 - #75881 (Expand rustdoc theme chooser x padding)
 - #75885 (Fix another clashing_extern_declarations false positive.)
 - #75892 (Fix typo in TLS Model in Unstable Book)
 - #75910 (Add test for issue #27130)
 - #75917 (Move to intra doc links for core::ptr::non_null)
 - #75975 (Allow --bess ing expect-tests in tools)
 - #75990 (Add __fastfail for Windows on arm/aarch64)
 - #76015 (Fix loading pretty-printers in rust-lldb script)
 - #76022 (Clean up rustdoc front-end source code)
 - #76029 (Move to intra-doc links for library/core/src/sync/atomic.rs)
 - #76057 (Move retokenize hack to save_analysis)

Failed merges:

r? @ghost
  • Loading branch information
bors committed Aug 30, 2020
2 parents ced37a5 + 9d7d24d commit 62850d8
Show file tree
Hide file tree
Showing 28 changed files with 349 additions and 589 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3927,8 +3927,8 @@ dependencies = [
"rustc_data_structures",
"rustc_hir",
"rustc_hir_pretty",
"rustc_lexer",
"rustc_middle",
"rustc_parse",
"rustc_session",
"rustc_span",
"serde_json",
Expand Down
4 changes: 1 addition & 3 deletions library/alloc/src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//!
//! # Examples
//!
//! You can explicitly create a [`Vec<T>`] with [`new`]:
//! You can explicitly create a [`Vec`] with [`Vec::new`]:
//!
//! ```
//! let v: Vec<i32> = Vec::new();
Expand Down Expand Up @@ -50,8 +50,6 @@
//! v[1] = v[1] + 5;
//! ```
//!
//! [`Vec<T>`]: Vec
//! [`new`]: Vec::new
//! [`push`]: Vec::push

#![stable(feature = "rust1", since = "1.0.0")]
Expand Down
31 changes: 8 additions & 23 deletions library/core/src/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
//! If you need more control over how a value is hashed, you need to implement
//! the [`Hash`] trait:
//!
//! [`Hash`]: trait.Hash.html
//!
//! ```rust
//! use std::collections::hash_map::DefaultHasher;
//! use std::hash::{Hash, Hasher};
Expand Down Expand Up @@ -149,11 +147,9 @@ mod sip;
/// Thankfully, you won't need to worry about upholding this property when
/// deriving both [`Eq`] and `Hash` with `#[derive(PartialEq, Eq, Hash)]`.
///
/// [`Eq`]: ../../std/cmp/trait.Eq.html
/// [`Hasher`]: trait.Hasher.html
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
/// [`HashSet`]: ../../std/collections/struct.HashSet.html
/// [`hash`]: #tymethod.hash
/// [`hash`]: Hash::hash
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Hash {
/// Feeds this value into the given [`Hasher`].
Expand All @@ -168,8 +164,6 @@ pub trait Hash {
/// 7920.hash(&mut hasher);
/// println!("Hash is {:x}!", hasher.finish());
/// ```
///
/// [`Hasher`]: trait.Hasher.html
#[stable(feature = "rust1", since = "1.0.0")]
fn hash<H: Hasher>(&self, state: &mut H);

Expand All @@ -186,8 +180,6 @@ pub trait Hash {
/// Hash::hash_slice(&numbers, &mut hasher);
/// println!("Hash is {:x}!", hasher.finish());
/// ```
///
/// [`Hasher`]: trait.Hasher.html
#[stable(feature = "hash_slice", since = "1.3.0")]
fn hash_slice<H: Hasher>(data: &[Self], state: &mut H)
where
Expand Down Expand Up @@ -239,10 +231,9 @@ pub use macros::Hash;
/// println!("Hash is {:x}!", hasher.finish());
/// ```
///
/// [`Hash`]: trait.Hash.html
/// [`finish`]: #tymethod.finish
/// [`write`]: #tymethod.write
/// [`write_u8`]: #method.write_u8
/// [`finish`]: Hasher::finish
/// [`write`]: Hasher::write
/// [`write_u8`]: Hasher::write_u8
#[stable(feature = "rust1", since = "1.0.0")]
pub trait Hasher {
/// Returns the hash value for the values written so far.
Expand All @@ -264,7 +255,7 @@ pub trait Hasher {
/// println!("Hash is {:x}!", hasher.finish());
/// ```
///
/// [`write`]: #tymethod.write
/// [`write`]: Hasher::write
#[stable(feature = "rust1", since = "1.0.0")]
fn finish(&self) -> u64;

Expand Down Expand Up @@ -433,8 +424,7 @@ impl<H: Hasher + ?Sized> Hasher for &mut H {
/// assert_eq!(hasher_1.finish(), hasher_2.finish());
/// ```
///
/// [`build_hasher`]: #tymethod.build_hasher
/// [`Hasher`]: trait.Hasher.html
/// [`build_hasher`]: BuildHasher::build_hasher
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
#[stable(since = "1.7.0", feature = "build_hasher")]
pub trait BuildHasher {
Expand All @@ -456,8 +446,6 @@ pub trait BuildHasher {
/// let s = RandomState::new();
/// let new_s = s.build_hasher();
/// ```
///
/// [`Hasher`]: trait.Hasher.html
#[stable(since = "1.7.0", feature = "build_hasher")]
fn build_hasher(&self) -> Self::Hasher;
}
Expand All @@ -470,7 +458,7 @@ pub trait BuildHasher {
/// defined.
///
/// Any `BuildHasherDefault` is [zero-sized]. It can be created with
/// [`default`][method.Default]. When using `BuildHasherDefault` with [`HashMap`] or
/// [`default`][method.default]. When using `BuildHasherDefault` with [`HashMap`] or
/// [`HashSet`], this doesn't need to be done, since they implement appropriate
/// [`Default`] instances themselves.
///
Expand Down Expand Up @@ -503,10 +491,7 @@ pub trait BuildHasher {
/// let hash_map = HashMap::<u32, u32, MyBuildHasher>::default();
/// ```
///
/// [`BuildHasher`]: trait.BuildHasher.html
/// [`Default`]: ../default/trait.Default.html
/// [method.default]: #method.default
/// [`Hasher`]: trait.Hasher.html
/// [method.default]: BuildHasherDefault::default
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
/// [`HashSet`]: ../../std/collections/struct.HashSet.html
/// [zero-sized]: https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts
Expand Down
36 changes: 16 additions & 20 deletions library/core/src/ptr/non_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ use crate::slice::{self, SliceIndex};
/// it is your responsibility to ensure that `as_mut` is never called, and `as_ptr`
/// is never used for mutation.
///
/// [`PhantomData`]: ../marker/struct.PhantomData.html
/// [`UnsafeCell<T>`]: ../cell/struct.UnsafeCell.html
/// [`PhantomData`]: crate::marker::PhantomData
/// [`UnsafeCell<T>`]: crate::cell::UnsafeCell
#[stable(feature = "nonnull", since = "1.25.0")]
#[repr(transparent)]
#[rustc_layout_scalar_valid_range_start(1)]
Expand Down Expand Up @@ -82,8 +82,8 @@ impl<T: Sized> NonNull<T> {
///
/// For the mutable counterpart see [`as_uninit_mut`].
///
/// [`as_ref`]: #method.as_ref
/// [`as_uninit_mut`]: #method.as_uninit_mut
/// [`as_ref`]: NonNull::as_ref
/// [`as_uninit_mut`]: NonNull::as_uninit_mut
///
/// # Safety
///
Expand Down Expand Up @@ -114,8 +114,8 @@ impl<T: Sized> NonNull<T> {
///
/// For the shared counterpart see [`as_uninit_ref`].
///
/// [`as_mut`]: #method.as_mut
/// [`as_uninit_ref`]: #method.as_uninit_ref
/// [`as_mut`]: NonNull::as_mut
/// [`as_uninit_ref`]: NonNull::as_uninit_ref
///
/// # Safety
///
Expand Down Expand Up @@ -181,8 +181,8 @@ impl<T: ?Sized> NonNull<T> {
///
/// For the mutable counterpart see [`as_mut`].
///
/// [`as_uninit_ref`]: #method.as_uninit_ref
/// [`as_mut`]: #method.as_mut
/// [`as_uninit_ref`]: NonNull::as_uninit_ref
/// [`as_mut`]: NonNull::as_mut
///
/// # Safety
///
Expand Down Expand Up @@ -217,8 +217,8 @@ impl<T: ?Sized> NonNull<T> {
///
/// For the shared counterpart see [`as_ref`].
///
/// [`as_uninit_mut`]: #method.as_uninit_mut
/// [`as_ref`]: #method.as_ref
/// [`as_uninit_mut`]: NonNull::as_uninit_mut
/// [`as_ref`]: NonNull::as_ref
///
/// # Safety
///
Expand Down Expand Up @@ -266,8 +266,6 @@ impl<T> NonNull<[T]> {
/// This function is safe, but dereferencing the return value is unsafe.
/// See the documentation of [`slice::from_raw_parts`] for slice safety requirements.
///
/// [`slice::from_raw_parts`]: ../../std/slice/fn.from_raw_parts.html
///
/// # Examples
///
/// ```rust
Expand Down Expand Up @@ -357,8 +355,8 @@ impl<T> NonNull<[T]> {
///
/// For the mutable counterpart see [`as_uninit_slice_mut`].
///
/// [`as_ref`]: #method.as_ref
/// [`as_uninit_slice_mut`]: #method.as_uninit_slice_mut
/// [`as_ref`]: NonNull::as_ref
/// [`as_uninit_slice_mut`]: NonNull::as_uninit_slice_mut
///
/// # Safety
///
Expand Down Expand Up @@ -386,10 +384,9 @@ impl<T> NonNull<[T]> {
///
/// This applies even if the result of this method is unused!
///
/// See also [`slice::from_raw_parts`][].
/// See also [`slice::from_raw_parts`].
///
/// [valid]: crate::ptr#safety
/// [`NonNull::dangling()`]: NonNull::dangling
/// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
#[inline]
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
Expand All @@ -403,8 +400,8 @@ impl<T> NonNull<[T]> {
///
/// For the shared counterpart see [`as_uninit_slice`].
///
/// [`as_mut`]: #method.as_mut
/// [`as_uninit_slice`]: #method.as_uninit_slice
/// [`as_mut`]: NonNull::as_mut
/// [`as_uninit_slice`]: NonNull::as_uninit_slice
///
/// # Safety
///
Expand Down Expand Up @@ -432,10 +429,9 @@ impl<T> NonNull<[T]> {
///
/// This applies even if the result of this method is unused!
///
/// See also [`slice::from_raw_parts_mut`][].
/// See also [`slice::from_raw_parts_mut`].
///
/// [valid]: crate::ptr#safety
/// [`NonNull::dangling()`]: NonNull::dangling
/// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
///
/// # Examples
Expand Down
Loading

0 comments on commit 62850d8

Please sign in to comment.