Skip to content

Commit 62850d8

Browse files
committed
Auto merge of rust-lang#76090 - Dylan-DPC:rollup-eksndcr, r=Dylan-DPC
Rollup of 14 pull requests Successful merges: - rust-lang#75832 (Move to intra-doc links for wasi/ext/fs.rs, os_str_bytes.rs…) - rust-lang#75852 (Switch to intra-doc links in `core::hash`) - rust-lang#75874 (Shorten liballoc doc intra link while readable) - rust-lang#75881 (Expand rustdoc theme chooser x padding) - rust-lang#75885 (Fix another clashing_extern_declarations false positive.) - rust-lang#75892 (Fix typo in TLS Model in Unstable Book) - rust-lang#75910 (Add test for issue rust-lang#27130) - rust-lang#75917 (Move to intra doc links for core::ptr::non_null) - rust-lang#75975 (Allow --bess ing expect-tests in tools) - rust-lang#75990 (Add __fastfail for Windows on arm/aarch64) - rust-lang#76015 (Fix loading pretty-printers in rust-lldb script) - rust-lang#76022 (Clean up rustdoc front-end source code) - rust-lang#76029 (Move to intra-doc links for library/core/src/sync/atomic.rs) - rust-lang#76057 (Move retokenize hack to save_analysis) Failed merges: r? @ghost
2 parents ced37a5 + 9d7d24d commit 62850d8

File tree

28 files changed

+349
-589
lines changed

28 files changed

+349
-589
lines changed

Cargo.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -3927,8 +3927,8 @@ dependencies = [
39273927
"rustc_data_structures",
39283928
"rustc_hir",
39293929
"rustc_hir_pretty",
3930+
"rustc_lexer",
39303931
"rustc_middle",
3931-
"rustc_parse",
39323932
"rustc_session",
39333933
"rustc_span",
39343934
"serde_json",

library/alloc/src/vec.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//!
1010
//! # Examples
1111
//!
12-
//! You can explicitly create a [`Vec<T>`] with [`new`]:
12+
//! You can explicitly create a [`Vec`] with [`Vec::new`]:
1313
//!
1414
//! ```
1515
//! let v: Vec<i32> = Vec::new();
@@ -50,8 +50,6 @@
5050
//! v[1] = v[1] + 5;
5151
//! ```
5252
//!
53-
//! [`Vec<T>`]: Vec
54-
//! [`new`]: Vec::new
5553
//! [`push`]: Vec::push
5654
5755
#![stable(feature = "rust1", since = "1.0.0")]

library/core/src/hash/mod.rs

+8-23
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
//! If you need more control over how a value is hashed, you need to implement
4040
//! the [`Hash`] trait:
4141
//!
42-
//! [`Hash`]: trait.Hash.html
43-
//!
4442
//! ```rust
4543
//! use std::collections::hash_map::DefaultHasher;
4644
//! use std::hash::{Hash, Hasher};
@@ -149,11 +147,9 @@ mod sip;
149147
/// Thankfully, you won't need to worry about upholding this property when
150148
/// deriving both [`Eq`] and `Hash` with `#[derive(PartialEq, Eq, Hash)]`.
151149
///
152-
/// [`Eq`]: ../../std/cmp/trait.Eq.html
153-
/// [`Hasher`]: trait.Hasher.html
154150
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
155151
/// [`HashSet`]: ../../std/collections/struct.HashSet.html
156-
/// [`hash`]: #tymethod.hash
152+
/// [`hash`]: Hash::hash
157153
#[stable(feature = "rust1", since = "1.0.0")]
158154
pub trait Hash {
159155
/// Feeds this value into the given [`Hasher`].
@@ -168,8 +164,6 @@ pub trait Hash {
168164
/// 7920.hash(&mut hasher);
169165
/// println!("Hash is {:x}!", hasher.finish());
170166
/// ```
171-
///
172-
/// [`Hasher`]: trait.Hasher.html
173167
#[stable(feature = "rust1", since = "1.0.0")]
174168
fn hash<H: Hasher>(&self, state: &mut H);
175169

@@ -186,8 +180,6 @@ pub trait Hash {
186180
/// Hash::hash_slice(&numbers, &mut hasher);
187181
/// println!("Hash is {:x}!", hasher.finish());
188182
/// ```
189-
///
190-
/// [`Hasher`]: trait.Hasher.html
191183
#[stable(feature = "hash_slice", since = "1.3.0")]
192184
fn hash_slice<H: Hasher>(data: &[Self], state: &mut H)
193185
where
@@ -239,10 +231,9 @@ pub use macros::Hash;
239231
/// println!("Hash is {:x}!", hasher.finish());
240232
/// ```
241233
///
242-
/// [`Hash`]: trait.Hash.html
243-
/// [`finish`]: #tymethod.finish
244-
/// [`write`]: #tymethod.write
245-
/// [`write_u8`]: #method.write_u8
234+
/// [`finish`]: Hasher::finish
235+
/// [`write`]: Hasher::write
236+
/// [`write_u8`]: Hasher::write_u8
246237
#[stable(feature = "rust1", since = "1.0.0")]
247238
pub trait Hasher {
248239
/// Returns the hash value for the values written so far.
@@ -264,7 +255,7 @@ pub trait Hasher {
264255
/// println!("Hash is {:x}!", hasher.finish());
265256
/// ```
266257
///
267-
/// [`write`]: #tymethod.write
258+
/// [`write`]: Hasher::write
268259
#[stable(feature = "rust1", since = "1.0.0")]
269260
fn finish(&self) -> u64;
270261

@@ -433,8 +424,7 @@ impl<H: Hasher + ?Sized> Hasher for &mut H {
433424
/// assert_eq!(hasher_1.finish(), hasher_2.finish());
434425
/// ```
435426
///
436-
/// [`build_hasher`]: #tymethod.build_hasher
437-
/// [`Hasher`]: trait.Hasher.html
427+
/// [`build_hasher`]: BuildHasher::build_hasher
438428
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
439429
#[stable(since = "1.7.0", feature = "build_hasher")]
440430
pub trait BuildHasher {
@@ -456,8 +446,6 @@ pub trait BuildHasher {
456446
/// let s = RandomState::new();
457447
/// let new_s = s.build_hasher();
458448
/// ```
459-
///
460-
/// [`Hasher`]: trait.Hasher.html
461449
#[stable(since = "1.7.0", feature = "build_hasher")]
462450
fn build_hasher(&self) -> Self::Hasher;
463451
}
@@ -470,7 +458,7 @@ pub trait BuildHasher {
470458
/// defined.
471459
///
472460
/// Any `BuildHasherDefault` is [zero-sized]. It can be created with
473-
/// [`default`][method.Default]. When using `BuildHasherDefault` with [`HashMap`] or
461+
/// [`default`][method.default]. When using `BuildHasherDefault` with [`HashMap`] or
474462
/// [`HashSet`], this doesn't need to be done, since they implement appropriate
475463
/// [`Default`] instances themselves.
476464
///
@@ -503,10 +491,7 @@ pub trait BuildHasher {
503491
/// let hash_map = HashMap::<u32, u32, MyBuildHasher>::default();
504492
/// ```
505493
///
506-
/// [`BuildHasher`]: trait.BuildHasher.html
507-
/// [`Default`]: ../default/trait.Default.html
508-
/// [method.default]: #method.default
509-
/// [`Hasher`]: trait.Hasher.html
494+
/// [method.default]: BuildHasherDefault::default
510495
/// [`HashMap`]: ../../std/collections/struct.HashMap.html
511496
/// [`HashSet`]: ../../std/collections/struct.HashSet.html
512497
/// [zero-sized]: https://doc.rust-lang.org/nomicon/exotic-sizes.html#zero-sized-types-zsts

library/core/src/ptr/non_null.rs

+16-20
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ use crate::slice::{self, SliceIndex};
3434
/// it is your responsibility to ensure that `as_mut` is never called, and `as_ptr`
3535
/// is never used for mutation.
3636
///
37-
/// [`PhantomData`]: ../marker/struct.PhantomData.html
38-
/// [`UnsafeCell<T>`]: ../cell/struct.UnsafeCell.html
37+
/// [`PhantomData`]: crate::marker::PhantomData
38+
/// [`UnsafeCell<T>`]: crate::cell::UnsafeCell
3939
#[stable(feature = "nonnull", since = "1.25.0")]
4040
#[repr(transparent)]
4141
#[rustc_layout_scalar_valid_range_start(1)]
@@ -82,8 +82,8 @@ impl<T: Sized> NonNull<T> {
8282
///
8383
/// For the mutable counterpart see [`as_uninit_mut`].
8484
///
85-
/// [`as_ref`]: #method.as_ref
86-
/// [`as_uninit_mut`]: #method.as_uninit_mut
85+
/// [`as_ref`]: NonNull::as_ref
86+
/// [`as_uninit_mut`]: NonNull::as_uninit_mut
8787
///
8888
/// # Safety
8989
///
@@ -114,8 +114,8 @@ impl<T: Sized> NonNull<T> {
114114
///
115115
/// For the shared counterpart see [`as_uninit_ref`].
116116
///
117-
/// [`as_mut`]: #method.as_mut
118-
/// [`as_uninit_ref`]: #method.as_uninit_ref
117+
/// [`as_mut`]: NonNull::as_mut
118+
/// [`as_uninit_ref`]: NonNull::as_uninit_ref
119119
///
120120
/// # Safety
121121
///
@@ -181,8 +181,8 @@ impl<T: ?Sized> NonNull<T> {
181181
///
182182
/// For the mutable counterpart see [`as_mut`].
183183
///
184-
/// [`as_uninit_ref`]: #method.as_uninit_ref
185-
/// [`as_mut`]: #method.as_mut
184+
/// [`as_uninit_ref`]: NonNull::as_uninit_ref
185+
/// [`as_mut`]: NonNull::as_mut
186186
///
187187
/// # Safety
188188
///
@@ -217,8 +217,8 @@ impl<T: ?Sized> NonNull<T> {
217217
///
218218
/// For the shared counterpart see [`as_ref`].
219219
///
220-
/// [`as_uninit_mut`]: #method.as_uninit_mut
221-
/// [`as_ref`]: #method.as_ref
220+
/// [`as_uninit_mut`]: NonNull::as_uninit_mut
221+
/// [`as_ref`]: NonNull::as_ref
222222
///
223223
/// # Safety
224224
///
@@ -266,8 +266,6 @@ impl<T> NonNull<[T]> {
266266
/// This function is safe, but dereferencing the return value is unsafe.
267267
/// See the documentation of [`slice::from_raw_parts`] for slice safety requirements.
268268
///
269-
/// [`slice::from_raw_parts`]: ../../std/slice/fn.from_raw_parts.html
270-
///
271269
/// # Examples
272270
///
273271
/// ```rust
@@ -357,8 +355,8 @@ impl<T> NonNull<[T]> {
357355
///
358356
/// For the mutable counterpart see [`as_uninit_slice_mut`].
359357
///
360-
/// [`as_ref`]: #method.as_ref
361-
/// [`as_uninit_slice_mut`]: #method.as_uninit_slice_mut
358+
/// [`as_ref`]: NonNull::as_ref
359+
/// [`as_uninit_slice_mut`]: NonNull::as_uninit_slice_mut
362360
///
363361
/// # Safety
364362
///
@@ -386,10 +384,9 @@ impl<T> NonNull<[T]> {
386384
///
387385
/// This applies even if the result of this method is unused!
388386
///
389-
/// See also [`slice::from_raw_parts`][].
387+
/// See also [`slice::from_raw_parts`].
390388
///
391389
/// [valid]: crate::ptr#safety
392-
/// [`NonNull::dangling()`]: NonNull::dangling
393390
/// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
394391
#[inline]
395392
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
@@ -403,8 +400,8 @@ impl<T> NonNull<[T]> {
403400
///
404401
/// For the shared counterpart see [`as_uninit_slice`].
405402
///
406-
/// [`as_mut`]: #method.as_mut
407-
/// [`as_uninit_slice`]: #method.as_uninit_slice
403+
/// [`as_mut`]: NonNull::as_mut
404+
/// [`as_uninit_slice`]: NonNull::as_uninit_slice
408405
///
409406
/// # Safety
410407
///
@@ -432,10 +429,9 @@ impl<T> NonNull<[T]> {
432429
///
433430
/// This applies even if the result of this method is unused!
434431
///
435-
/// See also [`slice::from_raw_parts_mut`][].
432+
/// See also [`slice::from_raw_parts_mut`].
436433
///
437434
/// [valid]: crate::ptr#safety
438-
/// [`NonNull::dangling()`]: NonNull::dangling
439435
/// [`pointer::offset`]: ../../std/primitive.pointer.html#method.offset
440436
///
441437
/// # Examples

0 commit comments

Comments
 (0)