X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fstd%2Fsrc%2Fpath.rs;h=e544608f83c299c9ad3f2262b2ffc50062a48298;hb=09350d2cf0bc3d931b47dfc4fdee69e76a0a50ad;hp=adb8b30ec08930b0c7c8827e4f580e67c2576dee;hpb=6a2b612590284f2e8fc08117c976e017ddd79d81;p=rust.git diff --git a/library/std/src/path.rs b/library/std/src/path.rs index adb8b30ec08..e544608f83c 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 ////////////////////////////////////////////////////////////////////////////////