Skip to content

Commit c12eb1d

Browse files
authored
Auto merge of #34468 - frewsxcv:doc-links, r=GuillaumeGomez
Add hyperlinks to `std::fs` functions from `std::path`. None
2 parents 2cfd91d + c55f092 commit c12eb1d

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/libstd/path.rs

+15-5
Original file line numberDiff line numberDiff line change
@@ -1781,15 +1781,19 @@ impl Path {
17811781
/// This function will traverse symbolic links to query information about the
17821782
/// destination file.
17831783
///
1784-
/// This is an alias to `fs::metadata`.
1784+
/// This is an alias to [`fs::metadata`].
1785+
///
1786+
/// [`fs::metadata`]: ../fs/fn.metadata.html
17851787
#[stable(feature = "path_ext", since = "1.5.0")]
17861788
pub fn metadata(&self) -> io::Result<fs::Metadata> {
17871789
fs::metadata(self)
17881790
}
17891791

17901792
/// Query the metadata about a file without following symlinks.
17911793
///
1792-
/// This is an alias to `fs::symlink_metadata`.
1794+
/// This is an alias to [`fs::symlink_metadata`].
1795+
///
1796+
/// [`fs::symlink_metadata`]: ../fs/fn.symlink_metadata.html
17931797
#[stable(feature = "path_ext", since = "1.5.0")]
17941798
pub fn symlink_metadata(&self) -> io::Result<fs::Metadata> {
17951799
fs::symlink_metadata(self)
@@ -1798,15 +1802,19 @@ impl Path {
17981802
/// Returns the canonical form of the path with all intermediate components
17991803
/// normalized and symbolic links resolved.
18001804
///
1801-
/// This is an alias to `fs::canonicalize`.
1805+
/// This is an alias to [`fs::canonicalize`].
1806+
///
1807+
/// [`fs::canonicalize`]: ../fs/fn.canonicalize.html
18021808
#[stable(feature = "path_ext", since = "1.5.0")]
18031809
pub fn canonicalize(&self) -> io::Result<PathBuf> {
18041810
fs::canonicalize(self)
18051811
}
18061812

18071813
/// Reads a symbolic link, returning the file that the link points to.
18081814
///
1809-
/// This is an alias to `fs::read_link`.
1815+
/// This is an alias to [`fs::read_link`].
1816+
///
1817+
/// [`fs::read_link`]: ../fs/fn.read_link.html
18101818
#[stable(feature = "path_ext", since = "1.5.0")]
18111819
pub fn read_link(&self) -> io::Result<PathBuf> {
18121820
fs::read_link(self)
@@ -1817,7 +1825,9 @@ impl Path {
18171825
/// The iterator will yield instances of `io::Result<DirEntry>`. New errors may
18181826
/// be encountered after an iterator is initially constructed.
18191827
///
1820-
/// This is an alias to `fs::read_dir`.
1828+
/// This is an alias to [`fs::read_dir`].
1829+
///
1830+
/// [`fs::read_dir`]: ../fs/fn.read_dir.html
18211831
#[stable(feature = "path_ext", since = "1.5.0")]
18221832
pub fn read_dir(&self) -> io::Result<fs::ReadDir> {
18231833
fs::read_dir(self)

0 commit comments

Comments
 (0)