From 80fde23a75513b498f95051719b2c8e0e3afecc4 Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Sun, 13 Feb 2022 14:20:29 -0800 Subject: [PATCH] Add MAIN_SEPARATOR_STR Signed-off-by: Alex Saveau --- library/std/src/path.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/library/std/src/path.rs b/library/std/src/path.rs index e540f86016038..1117b66b382f5 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -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 ////////////////////////////////////////////////////////////////////////////////