From: Tobias Bucher Date: Sat, 15 Dec 2018 17:51:08 +0000 (+0100) Subject: Fix doc of `std::fs::canonicalize` X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=f61686ae705a8d149a922b52cb09a9298d7b7cad;p=rust.git 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. --- 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>(path: P) -> io::Result { /// 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 ///