Skip to content

Commit 08deb86

Browse files
committed
Auto merge of #76235 - jyn514:std-intra-links, r=poliorcetics
Convert many files to intra-doc links Helps with #75080 r? @poliorcetics I recommend reviewing one commit at a time, but the diff is small enough you can do it all at once if you like :)
2 parents 1e33c74 + bb10347 commit 08deb86

File tree

10 files changed

+34
-79
lines changed

10 files changed

+34
-79
lines changed

Diff for: library/alloc/src/boxed.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl<T> Box<T> {
217217
/// assert_eq!(*zero, 0)
218218
/// ```
219219
///
220-
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
220+
/// [zeroed]: mem::MaybeUninit::zeroed
221221
#[unstable(feature = "new_uninit", issue = "63291")]
222222
pub fn new_zeroed() -> Box<mem::MaybeUninit<T>> {
223223
let layout = alloc::Layout::new::<mem::MaybeUninit<T>>();
@@ -289,7 +289,7 @@ impl<T> Box<[T]> {
289289
/// assert_eq!(*values, [0, 0, 0])
290290
/// ```
291291
///
292-
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
292+
/// [zeroed]: mem::MaybeUninit::zeroed
293293
#[unstable(feature = "new_uninit", issue = "63291")]
294294
pub fn new_zeroed_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> {
295295
unsafe { RawVec::with_capacity_zeroed(len).into_box(len) }
@@ -307,7 +307,7 @@ impl<T> Box<mem::MaybeUninit<T>> {
307307
/// Calling this when the content is not yet fully initialized
308308
/// causes immediate undefined behavior.
309309
///
310-
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
310+
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
311311
///
312312
/// # Examples
313313
///
@@ -343,7 +343,7 @@ impl<T> Box<[mem::MaybeUninit<T>]> {
343343
/// Calling this when the content is not yet fully initialized
344344
/// causes immediate undefined behavior.
345345
///
346-
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
346+
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
347347
///
348348
/// # Examples
349349
///

Diff for: library/alloc/src/rc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ impl<T> Rc<T> {
376376
/// assert_eq!(*zero, 0)
377377
/// ```
378378
///
379-
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
379+
/// [zeroed]: mem::MaybeUninit::zeroed
380380
#[unstable(feature = "new_uninit", issue = "63291")]
381381
pub fn new_zeroed() -> Rc<mem::MaybeUninit<T>> {
382382
unsafe {
@@ -484,7 +484,7 @@ impl<T> Rc<[T]> {
484484
/// assert_eq!(*values, [0, 0, 0])
485485
/// ```
486486
///
487-
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
487+
/// [zeroed]: mem::MaybeUninit::zeroed
488488
#[unstable(feature = "new_uninit", issue = "63291")]
489489
pub fn new_zeroed_slice(len: usize) -> Rc<[mem::MaybeUninit<T>]> {
490490
unsafe {
@@ -511,7 +511,7 @@ impl<T> Rc<mem::MaybeUninit<T>> {
511511
/// Calling this when the content is not yet fully initialized
512512
/// causes immediate undefined behavior.
513513
///
514-
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
514+
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
515515
///
516516
/// # Examples
517517
///
@@ -550,7 +550,7 @@ impl<T> Rc<[mem::MaybeUninit<T>]> {
550550
/// Calling this when the content is not yet fully initialized
551551
/// causes immediate undefined behavior.
552552
///
553-
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
553+
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
554554
///
555555
/// # Examples
556556
///

Diff for: library/alloc/src/sync.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ macro_rules! acquire {
152152
/// [upgrade]: Weak::upgrade
153153
/// [`RefCell<T>`]: core::cell::RefCell
154154
/// [`std::sync`]: ../../std/sync/index.html
155-
/// [`Arc::clone(&from)`]: #method.clone
155+
/// [`Arc::clone(&from)`]: Arc::clone
156156
///
157157
/// # Examples
158158
///
@@ -201,7 +201,7 @@ macro_rules! acquire {
201201
/// See the [`rc` documentation][rc_examples] for more examples of reference
202202
/// counting in general.
203203
///
204-
/// [rc_examples]: ../../std/rc/index.html#examples
204+
/// [rc_examples]: crate::rc#examples
205205
#[cfg_attr(not(test), rustc_diagnostic_item = "Arc")]
206206
#[stable(feature = "rust1", since = "1.0.0")]
207207
pub struct Arc<T: ?Sized> {

Diff for: library/core/src/pin.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
661661
/// because it is one of the fields of that value), and also that you do
662662
/// not move out of the argument you receive to the interior function.
663663
///
664-
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
664+
/// [`pin` module]: self#projections-and-structural-pinning
665665
#[stable(feature = "pin", since = "1.33.0")]
666666
pub unsafe fn map_unchecked<U, F>(self, func: F) -> Pin<&'a U>
667667
where
@@ -692,7 +692,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
692692
/// the `Pin` itself. This method allows turning the `Pin` into a reference
693693
/// with the same lifetime as the original `Pin`.
694694
///
695-
/// ["pinning projections"]: ../../std/pin/index.html#projections-and-structural-pinning
695+
/// ["pinning projections"]: self#projections-and-structural-pinning
696696
#[stable(feature = "pin", since = "1.33.0")]
697697
#[inline(always)]
698698
pub fn get_ref(self) -> &'a T {
@@ -756,7 +756,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
756756
/// because it is one of the fields of that value), and also that you do
757757
/// not move out of the argument you receive to the interior function.
758758
///
759-
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
759+
/// [`pin` module]: self#projections-and-structural-pinning
760760
#[stable(feature = "pin", since = "1.33.0")]
761761
pub unsafe fn map_unchecked_mut<U, F>(self, func: F) -> Pin<&'a mut U>
762762
where

Diff for: library/std/src/ascii.rs

-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ pub trait AsciiExt {
7070
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
7171
///
7272
/// [`make_ascii_uppercase`]: AsciiExt::make_ascii_uppercase
73-
/// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase
7473
#[stable(feature = "rust1", since = "1.0.0")]
7574
#[allow(deprecated)]
7675
fn to_ascii_uppercase(&self) -> Self::Owned;
@@ -91,7 +90,6 @@ pub trait AsciiExt {
9190
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
9291
///
9392
/// [`make_ascii_lowercase`]: AsciiExt::make_ascii_lowercase
94-
/// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase
9593
#[stable(feature = "rust1", since = "1.0.0")]
9694
#[allow(deprecated)]
9795
fn to_ascii_lowercase(&self) -> Self::Owned;

Diff for: library/std/src/fs.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ impl File {
553553
/// the `SetFileInformationByHandle` function on Windows. Note that, this
554554
/// [may change in the future][changes].
555555
///
556-
/// [changes]: ../io/index.html#platform-specific-behavior
556+
/// [changes]: io#platform-specific-behavior
557557
///
558558
/// # Errors
559559
///
@@ -1503,7 +1503,7 @@ impl AsInner<fs_imp::DirEntry> for DirEntry {
15031503
/// and the `DeleteFile` function on Windows.
15041504
/// Note that, this [may change in the future][changes].
15051505
///
1506-
/// [changes]: ../io/index.html#platform-specific-behavior
1506+
/// [changes]: io#platform-specific-behavior
15071507
///
15081508
/// # Errors
15091509
///
@@ -1541,7 +1541,7 @@ pub fn remove_file<P: AsRef<Path>>(path: P) -> io::Result<()> {
15411541
/// and the `GetFileAttributesEx` function on Windows.
15421542
/// Note that, this [may change in the future][changes].
15431543
///
1544-
/// [changes]: ../io/index.html#platform-specific-behavior
1544+
/// [changes]: io#platform-specific-behavior
15451545
///
15461546
/// # Errors
15471547
///
@@ -1575,7 +1575,7 @@ pub fn metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
15751575
/// and the `GetFileAttributesEx` function on Windows.
15761576
/// Note that, this [may change in the future][changes].
15771577
///
1578-
/// [changes]: ../io/index.html#platform-specific-behavior
1578+
/// [changes]: io#platform-specific-behavior
15791579
///
15801580
/// # Errors
15811581
///
@@ -1618,7 +1618,7 @@ pub fn symlink_metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
16181618
///
16191619
/// Note that, this [may change in the future][changes].
16201620
///
1621-
/// [changes]: ../io/index.html#platform-specific-behavior
1621+
/// [changes]: io#platform-specific-behavior
16221622
///
16231623
/// # Errors
16241624
///
@@ -1669,7 +1669,7 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()>
16691669
/// `fcopyfile`.
16701670
/// Note that, this [may change in the future][changes].
16711671
///
1672-
/// [changes]: ../io/index.html#platform-specific-behavior
1672+
/// [changes]: io#platform-specific-behavior
16731673
///
16741674
/// # Errors
16751675
///
@@ -1707,7 +1707,7 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
17071707
/// and the `CreateHardLink` function on Windows.
17081708
/// Note that, this [may change in the future][changes].
17091709
///
1710-
/// [changes]: ../io/index.html#platform-specific-behavior
1710+
/// [changes]: io#platform-specific-behavior
17111711
///
17121712
/// # Errors
17131713
///
@@ -1772,7 +1772,7 @@ pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<(
17721772
/// `FILE_FLAG_BACKUP_SEMANTICS` flags on Windows.
17731773
/// Note that, this [may change in the future][changes].
17741774
///
1775-
/// [changes]: ../io/index.html#platform-specific-behavior
1775+
/// [changes]: io#platform-specific-behavior
17761776
///
17771777
/// # Errors
17781778
///
@@ -1812,7 +1812,7 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
18121812
/// with other applications (if passed to the application on the command-line,
18131813
/// or written to a file another application may read).
18141814
///
1815-
/// [changes]: ../io/index.html#platform-specific-behavior
1815+
/// [changes]: io#platform-specific-behavior
18161816
/// [path]: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
18171817
///
18181818
/// # Errors
@@ -1846,7 +1846,7 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
18461846
/// and the `CreateDirectory` function on Windows.
18471847
/// Note that, this [may change in the future][changes].
18481848
///
1849-
/// [changes]: ../io/index.html#platform-specific-behavior
1849+
/// [changes]: io#platform-specific-behavior
18501850
///
18511851
/// **NOTE**: If a parent of the given path doesn't exist, this function will
18521852
/// return an error. To create a directory and all its missing parents at the
@@ -1887,7 +1887,7 @@ pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
18871887
/// and the `CreateDirectory` function on Windows.
18881888
/// Note that, this [may change in the future][changes].
18891889
///
1890-
/// [changes]: ../io/index.html#platform-specific-behavior
1890+
/// [changes]: io#platform-specific-behavior
18911891
///
18921892
/// # Errors
18931893
///
@@ -1930,7 +1930,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
19301930
/// and the `RemoveDirectory` function on Windows.
19311931
/// Note that, this [may change in the future][changes].
19321932
///
1933-
/// [changes]: ../io/index.html#platform-specific-behavior
1933+
/// [changes]: io#platform-specific-behavior
19341934
///
19351935
/// # Errors
19361936
///
@@ -1970,7 +1970,7 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
19701970
/// on Windows.
19711971
/// Note that, this [may change in the future][changes].
19721972
///
1973-
/// [changes]: ../io/index.html#platform-specific-behavior
1973+
/// [changes]: io#platform-specific-behavior
19741974
///
19751975
/// # Errors
19761976
///
@@ -2006,7 +2006,7 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
20062006
/// currently corresponds to `readdir` on Unix and `FindNextFile` on Windows.
20072007
/// Note that, this [may change in the future][changes].
20082008
///
2009-
/// [changes]: ../io/index.html#platform-specific-behavior
2009+
/// [changes]: io#platform-specific-behavior
20102010
///
20112011
/// The order in which this iterator returns entries is platform and filesystem
20122012
/// dependent.
@@ -2075,7 +2075,7 @@ pub fn read_dir<P: AsRef<Path>>(path: P) -> io::Result<ReadDir> {
20752075
/// and the `SetFileAttributes` function on Windows.
20762076
/// Note that, this [may change in the future][changes].
20772077
///
2078-
/// [changes]: ../io/index.html#platform-specific-behavior
2078+
/// [changes]: io#platform-specific-behavior
20792079
///
20802080
/// # Errors
20812081
///

Diff for: library/std/src/net/addr.rs

-4
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,6 @@ impl SocketAddr {
213213
///
214214
/// [IP address]: IpAddr
215215
/// [`IPv4` address]: IpAddr::V4
216-
/// [`false`]: ../../std/primitive.bool.html
217-
/// [`true`]: ../../std/primitive.bool.html
218216
///
219217
/// # Examples
220218
///
@@ -235,8 +233,6 @@ impl SocketAddr {
235233
///
236234
/// [IP address]: IpAddr
237235
/// [`IPv6` address]: IpAddr::V6
238-
/// [`false`]: ../../std/primitive.bool.html
239-
/// [`true`]: ../../std/primitive.bool.html
240236
///
241237
/// # Examples
242238
///

0 commit comments

Comments
 (0)