Skip to content

Commit 6574d83

Browse files
authored
Rollup merge of #56858 - tbu-:pr_doc_canonicalize, r=shepmaster
Fix doc of `std::fs::canonicalize` Point out that the final component of the path name might be a filename (and not a directory name). Previously, the doc said that all components of the path must be directory names, when it actually only ment all but the final one. Fixes #54056.
2 parents cee0bdd + f61686a commit 6574d83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
17291729
/// limited to just these cases:
17301730
///
17311731
/// * `path` does not exist.
1732-
/// * A component in path is not a directory.
1732+
/// * A non-final component in path is not a directory.
17331733
///
17341734
/// # Examples
17351735
///

0 commit comments

Comments
 (0)