Skip to content

Commit

Permalink
Auto merge of #75565 - nixphix:docs/vxworks-ext, r=jyn514
Browse files Browse the repository at this point in the history
Switch to intra-doc links in std/src/sys/vxworks/ext/{fs,process}.rs

Partial fix for #75080

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

r? @jyn514
  • Loading branch information
bors committed Aug 16, 2020
2 parents 243c725 + c5849ae commit de32266
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 30 deletions.
34 changes: 10 additions & 24 deletions library/std/src/sys/vxworks/ext/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ use crate::sys;
use crate::sys::platform::fs::MetadataExt as UnixMetadataExt;
use crate::sys_common::{AsInner, AsInnerMut, FromInner};

/// Unix-specific extensions to [`File`].
///
/// [`File`]: ../../../../std/fs/struct.File.html
/// Unix-specific extensions to [`fs::File`].
#[stable(feature = "file_offset", since = "1.15.0")]
pub trait FileExt {
/// Reads a number of bytes starting from a given offset.
Expand All @@ -24,7 +22,7 @@ pub trait FileExt {
/// Note that similar to [`File::read`], it is not an error to return with a
/// short read.
///
/// [`File::read`]: ../../../../std/fs/struct.File.html#method.read
/// [`File::read`]: fs::File::read
///
/// # Examples
///
Expand Down Expand Up @@ -55,8 +53,8 @@ pub trait FileExt {
///
/// Similar to [`Read::read_exact`] but uses [`read_at`] instead of `read`.
///
/// [`Read::read_exact`]: ../../../../std/io/trait.Read.html#method.read_exact
/// [`read_at`]: #tymethod.read_at
/// [`Read::read_exact`]: io::Read::read_exact
/// [`read_at`]: FileExt::read_at
///
/// # Errors
///
Expand All @@ -75,8 +73,8 @@ pub trait FileExt {
/// has read, but it will never read more than would be necessary to
/// completely fill the buffer.
///
/// [`ErrorKind::Interrupted`]: ../../../../std/io/enum.ErrorKind.html#variant.Interrupted
/// [`ErrorKind::UnexpectedEof`]: ../../../../std/io/enum.ErrorKind.html#variant.UnexpectedEof
/// [`ErrorKind::Interrupted`]: io::ErrorKind::Interrupted
/// [`ErrorKind::UnexpectedEof`]: io::ErrorKind::UnexpectedEof
///
/// # Examples
///
Expand Down Expand Up @@ -132,7 +130,7 @@ pub trait FileExt {
/// Note that similar to [`File::write`], it is not an error to return a
/// short write.
///
/// [`File::write`]: ../../../../std/fs/struct.File.html#method.write
/// [`File::write`]: fs::File::write
///
/// # Examples
///
Expand Down Expand Up @@ -171,8 +169,8 @@ pub trait FileExt {
/// This function will return the first error of
/// non-[`ErrorKind::Interrupted`] kind that [`write_at`] returns.
///
/// [`ErrorKind::Interrupted`]: ../../../../std/io/enum.ErrorKind.html#variant.Interrupted
/// [`write_at`]: #tymethod.write_at
/// [`ErrorKind::Interrupted`]: io::ErrorKind::Interrupted
/// [`write_at`]: FileExt::write_at
///
/// # Examples
///
Expand Down Expand Up @@ -223,8 +221,6 @@ impl FileExt for fs::File {
}

/// Unix-specific extensions to [`fs::Permissions`].
///
/// [`fs::Permissions`]: ../../../../std/fs/struct.Permissions.html
#[stable(feature = "fs_ext", since = "1.1.0")]
pub trait PermissionsExt {
/// Returns the underlying raw `st_mode` bits that contain the standard
Expand Down Expand Up @@ -300,8 +296,6 @@ impl PermissionsExt for Permissions {
}

/// Unix-specific extensions to [`fs::OpenOptions`].
///
/// [`fs::OpenOptions`]: ../../../../std/fs/struct.OpenOptions.html
#[stable(feature = "fs_ext", since = "1.1.0")]
pub trait OpenOptionsExt {
/// Sets the mode bits that a new file will be created with.
Expand Down Expand Up @@ -369,8 +363,6 @@ impl OpenOptionsExt for OpenOptions {
*/

/// Unix-specific extensions to [`fs::Metadata`].
///
/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html
#[stable(feature = "metadata_ext", since = "1.1.0")]
pub trait MetadataExt {
/// Returns the ID of the device containing the file.
Expand Down Expand Up @@ -650,12 +642,10 @@ impl MetadataExt for fs::Metadata {
}
}

/// Unix-specific extensions for [`FileType`].
/// Unix-specific extensions for [`fs::FileType`].
///
/// Adds support for special Unix file types such as block/character devices,
/// pipes, and sockets.
///
/// [`FileType`]: ../../../../std/fs/struct.FileType.html
#[stable(feature = "file_type_ext", since = "1.5.0")]
pub trait FileTypeExt {
/// Returns whether this file type is a block device.
Expand Down Expand Up @@ -749,8 +739,6 @@ impl FileTypeExt for fs::FileType {
}

/// Unix-specific extension methods for [`fs::DirEntry`].
///
/// [`fs::DirEntry`]: ../../../../std/fs/struct.DirEntry.html
#[stable(feature = "dir_entry_ext", since = "1.1.0")]
pub trait DirEntryExt {
/// Returns the underlying `d_ino` field in the contained `dirent`
Expand Down Expand Up @@ -811,8 +799,6 @@ pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<()>
}

/// Unix-specific extensions to [`fs::DirBuilder`].
///
/// [`fs::DirBuilder`]: ../../../../std/fs/struct.DirBuilder.html
#[stable(feature = "dir_builder", since = "1.6.0")]
pub trait DirBuilderExt {
/// Sets the mode to create new directories with. This option defaults to
Expand Down
7 changes: 1 addition & 6 deletions library/std/src/sys/vxworks/ext/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ use crate::sys::vxworks::ext::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};

/// Unix-specific extensions to the [`process::Command`] builder.
///
/// [`process::Command`]: ../../../../std/process/struct.Command.html
#[stable(feature = "rust1", since = "1.0.0")]
pub trait CommandExt {
/// Sets the child process's user ID. This translates to a
Expand Down Expand Up @@ -65,7 +63,7 @@ pub trait CommandExt {
/// This method is stable and usable, but it should be unsafe. To fix
/// that, it got deprecated in favor of the unsafe [`pre_exec`].
///
/// [`pre_exec`]: #tymethod.pre_exec
/// [`pre_exec`]: CommandExt::pre_exec
#[stable(feature = "process_exec", since = "1.15.0")]
#[rustc_deprecated(since = "1.37.0", reason = "should be unsafe, use `pre_exec` instead")]
fn before_exec<F>(&mut self, f: F) -> &mut process::Command
Expand Down Expand Up @@ -94,7 +92,6 @@ pub trait CommandExt {
/// a new child. Like spawn, however, the default behavior for the stdio
/// descriptors will be to inherited from the current process.
///
/// [`process::exit`]: ../../../process/fn.exit.html
///
/// # Notes
///
Expand Down Expand Up @@ -151,8 +148,6 @@ impl CommandExt for process::Command {
}

/// Unix-specific extensions to [`process::ExitStatus`].
///
/// [`process::ExitStatus`]: ../../../../std/process/struct.ExitStatus.html
#[stable(feature = "rust1", since = "1.0.0")]
pub trait ExitStatusExt {
/// Creates a new `ExitStatus` from the raw underlying `i32` return value of
Expand Down

0 comments on commit de32266

Please sign in to comment.