about summary refs log tree commit diff
path: root/library/std/src/sys/os_str/bytes.rs
diff options
context:
space:
mode:
authorcyrgani <ansgar.w.zielke@gmail.com>2025-05-24 22:33:11 +0200
committercyrgani <ansgar.w.zielke@gmail.com>2025-05-24 22:33:11 +0200
commitfab206bf5852c532f85b9ad30f9eea8fc952e8e1 (patch)
tree855a3a240a04ac043d2767d69766c5a9e15301b1 /library/std/src/sys/os_str/bytes.rs
parente88e85463468ce5d5ce468414eb69e3b15fa8d42 (diff)
downloadrust-fab206bf5852c532f85b9ad30f9eea8fc952e8e1.tar.gz
rust-fab206bf5852c532f85b9ad30f9eea8fc952e8e1.zip
make `OsString::new` and `PathBuf::new` unstably const
Diffstat (limited to 'library/std/src/sys/os_str/bytes.rs')
-rw-r--r--library/std/src/sys/os_str/bytes.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/os_str/bytes.rs b/library/std/src/sys/os_str/bytes.rs
index 4a8808c9230..f8ab4543a3a 100644
--- a/library/std/src/sys/os_str/bytes.rs
+++ b/library/std/src/sys/os_str/bytes.rs
@@ -115,7 +115,7 @@ impl Buf {
     }
 
     #[inline]
-    pub fn from_string(s: String) -> Buf {
+    pub const fn from_string(s: String) -> Buf {
         Buf { inner: s.into_bytes() }
     }