about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-02 22:16:18 +0100
committerGitHub <noreply@github.com>2021-12-02 22:16:18 +0100
commit6e5f4c2f1b67ab46365d33c84f2bd64b25993603 (patch)
treeaaa589ba3f620c7a5f3c4a3c9775fa6df994634b
parent2ec0f841b44015888b69154955bd5aa7bcd9c9be (diff)
parentd8832425fc407f36191dcc65c4bc41319aca5c14 (diff)
downloadrust-6e5f4c2f1b67ab46365d33c84f2bd64b25993603.tar.gz
rust-6e5f4c2f1b67ab46365d33c84f2bd64b25993603.zip
Rollup merge of #91464 - ChrisDenton:doc-path-case-sensitivity, r=joshtriplett
Document file path case sensitivity

This describes the current behaviour of the standard library's pure path methods.

Fixes #66260.
-rw-r--r--library/std/src/path.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index cf2cd5adc48..9ade2847e8e 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -12,6 +12,13 @@
 //! [`PathBuf`]; note that the paths may differ syntactically by the
 //! normalization described in the documentation for the [`components`] method.
 //!
+//! ## Case sensitivity
+//!
+//! Unless otherwise indicated path methods that do not access the filesystem,
+//! such as [`Path::starts_with`] and [`Path::ends_with`], are case sensitive no
+//! matter the platform or filesystem. An exception to this is made for Windows
+//! drive letters.
+//!
 //! ## Simple usage
 //!
 //! Path manipulation includes both parsing components from slices and building