Skip to content

Commit 9a5c00a

Browse files
authored
Rollup merge of #145464 - Kivooeo:stabilize-const_pathbuf_osstring_new, r=ibraheemdev
Stabilize `const_pathbuf_osstring_new` feature This closes [tracking issue](#141520) and stabilises `{OsString, PathBuf}::new` in const
2 parents b1a7bac + b79ab44 commit 9a5c00a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/std/src/ffi/os_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl OsString {
137137
#[stable(feature = "rust1", since = "1.0.0")]
138138
#[must_use]
139139
#[inline]
140-
#[rustc_const_unstable(feature = "const_pathbuf_osstring_new", issue = "141520")]
140+
#[rustc_const_stable(feature = "const_pathbuf_osstring_new", since = "CURRENT_RUSTC_VERSION")]
141141
pub const fn new() -> OsString {
142142
OsString { inner: Buf::from_string(String::new()) }
143143
}

library/std/src/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ impl PathBuf {
11911191
#[stable(feature = "rust1", since = "1.0.0")]
11921192
#[must_use]
11931193
#[inline]
1194-
#[rustc_const_unstable(feature = "const_pathbuf_osstring_new", issue = "141520")]
1194+
#[rustc_const_stable(feature = "const_pathbuf_osstring_new", since = "CURRENT_RUSTC_VERSION")]
11951195
pub const fn new() -> PathBuf {
11961196
PathBuf { inner: OsString::new() }
11971197
}

0 commit comments

Comments
 (0)