]> git.lizzy.rs Git - rust.git/commitdiff
Fix doc of `std::fs::canonicalize`
authorTobias Bucher <tobiasbucher5991@gmail.com>
Sat, 15 Dec 2018 17:51:08 +0000 (18:51 +0100)
committerTobias Bucher <tobiasbucher5991@gmail.com>
Sat, 15 Dec 2018 17:51:08 +0000 (18:51 +0100)
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.

src/libstd/fs.rs

index edcfdd9e5348336c2764ab4fb7607c465542e656..35ae4939249ea5a83ec1f7d76e9fabdd0fa42339 100644 (file)
@@ -1729,7 +1729,7 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
 /// limited to just these cases:
 ///
 /// * `path` does not exist.
-/// * A component in path is not a directory.
+/// * A non-final component in path is not a directory.
 ///
 /// # Examples
 ///