Rollup merge of #145464 - Kivooeo:stabilize-const_pathbuf_osstring_new, r=ibraheemdev
Stabilize `const_pathbuf_osstring_new` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/141520) and stabilises `{OsString, PathBuf}::new` in const
This commit is contained in:
commit
9a5c00a673
2 changed files with 2 additions and 2 deletions
|
|
@ -137,7 +137,7 @@ impl OsString {
|
|||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[rustc_const_unstable(feature = "const_pathbuf_osstring_new", issue = "141520")]
|
||||
#[rustc_const_stable(feature = "const_pathbuf_osstring_new", since = "CURRENT_RUSTC_VERSION")]
|
||||
pub const fn new() -> OsString {
|
||||
OsString { inner: Buf::from_string(String::new()) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1191,7 +1191,7 @@ impl PathBuf {
|
|||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[rustc_const_unstable(feature = "const_pathbuf_osstring_new", issue = "141520")]
|
||||
#[rustc_const_stable(feature = "const_pathbuf_osstring_new", since = "CURRENT_RUSTC_VERSION")]
|
||||
pub const fn new() -> PathBuf {
|
||||
PathBuf { inner: OsString::new() }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue