Skip to content

Commit de32266

Browse files
committed
Auto merge of #75565 - nixphix:docs/vxworks-ext, r=jyn514
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
2 parents 243c725 + c5849ae commit de32266

File tree

2 files changed

+11
-30
lines changed

2 files changed

+11
-30
lines changed

library/std/src/sys/vxworks/ext/fs.rs

+10-24
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ use crate::sys;
77
use crate::sys::platform::fs::MetadataExt as UnixMetadataExt;
88
use crate::sys_common::{AsInner, AsInnerMut, FromInner};
99

10-
/// Unix-specific extensions to [`File`].
11-
///
12-
/// [`File`]: ../../../../std/fs/struct.File.html
10+
/// Unix-specific extensions to [`fs::File`].
1311
#[stable(feature = "file_offset", since = "1.15.0")]
1412
pub trait FileExt {
1513
/// Reads a number of bytes starting from a given offset.
@@ -24,7 +22,7 @@ pub trait FileExt {
2422
/// Note that similar to [`File::read`], it is not an error to return with a
2523
/// short read.
2624
///
27-
/// [`File::read`]: ../../../../std/fs/struct.File.html#method.read
25+
/// [`File::read`]: fs::File::read
2826
///
2927
/// # Examples
3028
///
@@ -55,8 +53,8 @@ pub trait FileExt {
5553
///
5654
/// Similar to [`Read::read_exact`] but uses [`read_at`] instead of `read`.
5755
///
58-
/// [`Read::read_exact`]: ../../../../std/io/trait.Read.html#method.read_exact
59-
/// [`read_at`]: #tymethod.read_at
56+
/// [`Read::read_exact`]: io::Read::read_exact
57+
/// [`read_at`]: FileExt::read_at
6058
///
6159
/// # Errors
6260
///
@@ -75,8 +73,8 @@ pub trait FileExt {
7573
/// has read, but it will never read more than would be necessary to
7674
/// completely fill the buffer.
7775
///
78-
/// [`ErrorKind::Interrupted`]: ../../../../std/io/enum.ErrorKind.html#variant.Interrupted
79-
/// [`ErrorKind::UnexpectedEof`]: ../../../../std/io/enum.ErrorKind.html#variant.UnexpectedEof
76+
/// [`ErrorKind::Interrupted`]: io::ErrorKind::Interrupted
77+
/// [`ErrorKind::UnexpectedEof`]: io::ErrorKind::UnexpectedEof
8078
///
8179
/// # Examples
8280
///
@@ -132,7 +130,7 @@ pub trait FileExt {
132130
/// Note that similar to [`File::write`], it is not an error to return a
133131
/// short write.
134132
///
135-
/// [`File::write`]: ../../../../std/fs/struct.File.html#method.write
133+
/// [`File::write`]: fs::File::write
136134
///
137135
/// # Examples
138136
///
@@ -171,8 +169,8 @@ pub trait FileExt {
171169
/// This function will return the first error of
172170
/// non-[`ErrorKind::Interrupted`] kind that [`write_at`] returns.
173171
///
174-
/// [`ErrorKind::Interrupted`]: ../../../../std/io/enum.ErrorKind.html#variant.Interrupted
175-
/// [`write_at`]: #tymethod.write_at
172+
/// [`ErrorKind::Interrupted`]: io::ErrorKind::Interrupted
173+
/// [`write_at`]: FileExt::write_at
176174
///
177175
/// # Examples
178176
///
@@ -223,8 +221,6 @@ impl FileExt for fs::File {
223221
}
224222

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

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

371365
/// Unix-specific extensions to [`fs::Metadata`].
372-
///
373-
/// [`fs::Metadata`]: ../../../../std/fs/struct.Metadata.html
374366
#[stable(feature = "metadata_ext", since = "1.1.0")]
375367
pub trait MetadataExt {
376368
/// Returns the ID of the device containing the file.
@@ -650,12 +642,10 @@ impl MetadataExt for fs::Metadata {
650642
}
651643
}
652644

653-
/// Unix-specific extensions for [`FileType`].
645+
/// Unix-specific extensions for [`fs::FileType`].
654646
///
655647
/// Adds support for special Unix file types such as block/character devices,
656648
/// pipes, and sockets.
657-
///
658-
/// [`FileType`]: ../../../../std/fs/struct.FileType.html
659649
#[stable(feature = "file_type_ext", since = "1.5.0")]
660650
pub trait FileTypeExt {
661651
/// Returns whether this file type is a block device.
@@ -749,8 +739,6 @@ impl FileTypeExt for fs::FileType {
749739
}
750740

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

813801
/// Unix-specific extensions to [`fs::DirBuilder`].
814-
///
815-
/// [`fs::DirBuilder`]: ../../../../std/fs/struct.DirBuilder.html
816802
#[stable(feature = "dir_builder", since = "1.6.0")]
817803
pub trait DirBuilderExt {
818804
/// Sets the mode to create new directories with. This option defaults to

library/std/src/sys/vxworks/ext/process.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ use crate::sys::vxworks::ext::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
1010
use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
1111

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

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

0 commit comments

Comments
 (0)