From 3159fea43b5bd2bed818cd1c7e7e38cc717b9c2d Mon Sep 17 00:00:00 2001 From: Andyson007 Date: Sun, 19 Jan 2025 20:52:40 +0100 Subject: [PATCH] Changed docs to be less misleading in path::file_name(&self) --- library/std/src/path.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 7fd08a97f1f20..837e1ab130caf 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -2453,7 +2453,7 @@ impl Path { /// If the path is a normal file, this is the file name. If it's the path of a directory, this /// is the directory name. /// - /// Returns [`None`] if the path terminates in `..`. + /// Returns [`None`] if the path cannot be named (without accessing the filesystem) /// /// # Examples ///