summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2018-12-15 18:51:08 +0100
committerTobias Bucher <tobiasbucher5991@gmail.com>2018-12-15 18:51:08 +0100
commitf61686ae705a8d149a922b52cb09a9298d7b7cad (patch)
treeeb950db59f09ea32f2668da0418c513c78b0a618 /src/libstd
parent0a1b2267e45ed0a5bdbfcbe522024729c8bd1387 (diff)
downloadrust-f61686ae705a8d149a922b52cb09a9298d7b7cad.tar.gz
rust-f61686ae705a8d149a922b52cb09a9298d7b7cad.zip
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.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index edcfdd9e534..35ae4939249 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -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
 ///