Skip to content

Commit

Permalink
Auto merge of #76235 - jyn514:std-intra-links, r=poliorcetics
Browse files Browse the repository at this point in the history
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 :)
  • Loading branch information
bors committed Sep 3, 2020
2 parents 1e33c74 + bb10347 commit 08deb86
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 79 deletions.
8 changes: 4 additions & 4 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl<T> Box<T> {
/// assert_eq!(*zero, 0)
/// ```
///
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
/// [zeroed]: mem::MaybeUninit::zeroed
#[unstable(feature = "new_uninit", issue = "63291")]
pub fn new_zeroed() -> Box<mem::MaybeUninit<T>> {
let layout = alloc::Layout::new::<mem::MaybeUninit<T>>();
Expand Down Expand Up @@ -289,7 +289,7 @@ impl<T> Box<[T]> {
/// assert_eq!(*values, [0, 0, 0])
/// ```
///
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
/// [zeroed]: mem::MaybeUninit::zeroed
#[unstable(feature = "new_uninit", issue = "63291")]
pub fn new_zeroed_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> {
unsafe { RawVec::with_capacity_zeroed(len).into_box(len) }
Expand All @@ -307,7 +307,7 @@ impl<T> Box<mem::MaybeUninit<T>> {
/// Calling this when the content is not yet fully initialized
/// causes immediate undefined behavior.
///
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
///
/// # Examples
///
Expand Down Expand Up @@ -343,7 +343,7 @@ impl<T> Box<[mem::MaybeUninit<T>]> {
/// Calling this when the content is not yet fully initialized
/// causes immediate undefined behavior.
///
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
///
/// # Examples
///
Expand Down
8 changes: 4 additions & 4 deletions library/alloc/src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl<T> Rc<T> {
/// assert_eq!(*zero, 0)
/// ```
///
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
/// [zeroed]: mem::MaybeUninit::zeroed
#[unstable(feature = "new_uninit", issue = "63291")]
pub fn new_zeroed() -> Rc<mem::MaybeUninit<T>> {
unsafe {
Expand Down Expand Up @@ -484,7 +484,7 @@ impl<T> Rc<[T]> {
/// assert_eq!(*values, [0, 0, 0])
/// ```
///
/// [zeroed]: ../../std/mem/union.MaybeUninit.html#method.zeroed
/// [zeroed]: mem::MaybeUninit::zeroed
#[unstable(feature = "new_uninit", issue = "63291")]
pub fn new_zeroed_slice(len: usize) -> Rc<[mem::MaybeUninit<T>]> {
unsafe {
Expand All @@ -511,7 +511,7 @@ impl<T> Rc<mem::MaybeUninit<T>> {
/// Calling this when the content is not yet fully initialized
/// causes immediate undefined behavior.
///
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
///
/// # Examples
///
Expand Down Expand Up @@ -550,7 +550,7 @@ impl<T> Rc<[mem::MaybeUninit<T>]> {
/// Calling this when the content is not yet fully initialized
/// causes immediate undefined behavior.
///
/// [`MaybeUninit::assume_init`]: ../../std/mem/union.MaybeUninit.html#method.assume_init
/// [`MaybeUninit::assume_init`]: mem::MaybeUninit::assume_init
///
/// # Examples
///
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ macro_rules! acquire {
/// [upgrade]: Weak::upgrade
/// [`RefCell<T>`]: core::cell::RefCell
/// [`std::sync`]: ../../std/sync/index.html
/// [`Arc::clone(&from)`]: #method.clone
/// [`Arc::clone(&from)`]: Arc::clone
///
/// # Examples
///
Expand Down Expand Up @@ -201,7 +201,7 @@ macro_rules! acquire {
/// See the [`rc` documentation][rc_examples] for more examples of reference
/// counting in general.
///
/// [rc_examples]: ../../std/rc/index.html#examples
/// [rc_examples]: crate::rc#examples
#[cfg_attr(not(test), rustc_diagnostic_item = "Arc")]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Arc<T: ?Sized> {
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
/// because it is one of the fields of that value), and also that you do
/// not move out of the argument you receive to the interior function.
///
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
/// [`pin` module]: self#projections-and-structural-pinning
#[stable(feature = "pin", since = "1.33.0")]
pub unsafe fn map_unchecked<U, F>(self, func: F) -> Pin<&'a U>
where
Expand Down Expand Up @@ -692,7 +692,7 @@ impl<'a, T: ?Sized> Pin<&'a T> {
/// the `Pin` itself. This method allows turning the `Pin` into a reference
/// with the same lifetime as the original `Pin`.
///
/// ["pinning projections"]: ../../std/pin/index.html#projections-and-structural-pinning
/// ["pinning projections"]: self#projections-and-structural-pinning
#[stable(feature = "pin", since = "1.33.0")]
#[inline(always)]
pub fn get_ref(self) -> &'a T {
Expand Down Expand Up @@ -756,7 +756,7 @@ impl<'a, T: ?Sized> Pin<&'a mut T> {
/// because it is one of the fields of that value), and also that you do
/// not move out of the argument you receive to the interior function.
///
/// [`pin` module]: ../../std/pin/index.html#projections-and-structural-pinning
/// [`pin` module]: self#projections-and-structural-pinning
#[stable(feature = "pin", since = "1.33.0")]
pub unsafe fn map_unchecked_mut<U, F>(self, func: F) -> Pin<&'a mut U>
where
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/ascii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ pub trait AsciiExt {
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
///
/// [`make_ascii_uppercase`]: AsciiExt::make_ascii_uppercase
/// [`str::to_uppercase`]: ../primitive.str.html#method.to_uppercase
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated)]
fn to_ascii_uppercase(&self) -> Self::Owned;
Expand All @@ -91,7 +90,6 @@ pub trait AsciiExt {
/// inherent methods on `u8`, `char`, `[u8]` and `str`.
///
/// [`make_ascii_lowercase`]: AsciiExt::make_ascii_lowercase
/// [`str::to_lowercase`]: ../primitive.str.html#method.to_lowercase
#[stable(feature = "rust1", since = "1.0.0")]
#[allow(deprecated)]
fn to_ascii_lowercase(&self) -> Self::Owned;
Expand Down
30 changes: 15 additions & 15 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ impl File {
/// the `SetFileInformationByHandle` function on Windows. Note that, this
/// [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1503,7 +1503,7 @@ impl AsInner<fs_imp::DirEntry> for DirEntry {
/// and the `DeleteFile` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1541,7 +1541,7 @@ pub fn remove_file<P: AsRef<Path>>(path: P) -> io::Result<()> {
/// and the `GetFileAttributesEx` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1575,7 +1575,7 @@ pub fn metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
/// and the `GetFileAttributesEx` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1618,7 +1618,7 @@ pub fn symlink_metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
///
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1669,7 +1669,7 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()>
/// `fcopyfile`.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1707,7 +1707,7 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
/// and the `CreateHardLink` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1772,7 +1772,7 @@ pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<(
/// `FILE_FLAG_BACKUP_SEMANTICS` flags on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1812,7 +1812,7 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
/// with other applications (if passed to the application on the command-line,
/// or written to a file another application may read).
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
/// [path]: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
///
/// # Errors
Expand Down Expand Up @@ -1846,7 +1846,7 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
/// and the `CreateDirectory` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// **NOTE**: If a parent of the given path doesn't exist, this function will
/// return an error. To create a directory and all its missing parents at the
Expand Down Expand Up @@ -1887,7 +1887,7 @@ pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
/// and the `CreateDirectory` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1930,7 +1930,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
/// and the `RemoveDirectory` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -1970,7 +1970,7 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
/// on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down Expand Up @@ -2006,7 +2006,7 @@ pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
/// currently corresponds to `readdir` on Unix and `FindNextFile` on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// The order in which this iterator returns entries is platform and filesystem
/// dependent.
Expand Down Expand Up @@ -2075,7 +2075,7 @@ pub fn read_dir<P: AsRef<Path>>(path: P) -> io::Result<ReadDir> {
/// and the `SetFileAttributes` function on Windows.
/// Note that, this [may change in the future][changes].
///
/// [changes]: ../io/index.html#platform-specific-behavior
/// [changes]: io#platform-specific-behavior
///
/// # Errors
///
Expand Down
4 changes: 0 additions & 4 deletions library/std/src/net/addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ impl SocketAddr {
///
/// [IP address]: IpAddr
/// [`IPv4` address]: IpAddr::V4
/// [`false`]: ../../std/primitive.bool.html
/// [`true`]: ../../std/primitive.bool.html
///
/// # Examples
///
Expand All @@ -235,8 +233,6 @@ impl SocketAddr {
///
/// [IP address]: IpAddr
/// [`IPv6` address]: IpAddr::V6
/// [`false`]: ../../std/primitive.bool.html
/// [`true`]: ../../std/primitive.bool.html
///
/// # Examples
///
Expand Down
Loading

0 comments on commit 08deb86

Please sign in to comment.