]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/path.rs
Rollup merge of #93976 - SUPERCILEX:separator_str, r=yaahc
[rust.git] / library / std / src / path.rs
index adb8b30ec08930b0c7c8827e4f580e67c2576dee..e544608f83c299c9ad3f2262b2ffc50062a48298 100644 (file)
@@ -268,6 +268,12 @@ pub fn is_separator(c: char) -> bool {
 #[stable(feature = "rust1", since = "1.0.0")]
 pub const MAIN_SEPARATOR: char = crate::sys::path::MAIN_SEP;
 
+/// The primary separator of path components for the current platform.
+///
+/// For example, `/` on Unix and `\` on Windows.
+#[unstable(feature = "main_separator_str", issue = "94071")]
+pub const MAIN_SEPARATOR_STR: &str = crate::sys::path::MAIN_SEP_STR;
+
 ////////////////////////////////////////////////////////////////////////////////
 // Misc helpers
 ////////////////////////////////////////////////////////////////////////////////