diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/path.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 10ecaed3aef..97edb35e5b6 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -2002,6 +2002,13 @@ impl AsRef<Path> for OsStr { } } +#[stable(feature = "cow_os_str_as_ref_path", since = "1.8.0")] +impl<'a> AsRef<Path> for Cow<'a, OsStr> { + fn as_ref(&self) -> &Path { + Path::new(self) + } +} + #[stable(feature = "rust1", since = "1.0.0")] impl AsRef<Path> for OsString { fn as_ref(&self) -> &Path { |
