Skip to content

Commit b5b1d06

Browse files
committed
Fix Default for OsString/OsStr
1 parent aa5afb0 commit b5b1d06

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/ffi/os_str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl ops::Deref for OsString {
173173
}
174174
}
175175

176-
#[stable(feature = "rust1", since = "1.9.0")]
176+
#[stable(feature = "osstring_default", since = "1.9.0")]
177177
impl Default for OsString {
178178
#[inline]
179179
fn default() -> OsString {
@@ -310,11 +310,11 @@ impl OsStr {
310310
}
311311
}
312312

313-
#[stable(feature = "rust1", since = "1.9.0")]
313+
#[stable(feature = "osstring_default", since = "1.9.0")]
314314
impl<'a> Default for &'a OsStr {
315315
#[inline]
316316
fn default() -> &'a OsStr {
317-
""
317+
OsStr::new("")
318318
}
319319
}
320320

0 commit comments

Comments
 (0)