about summary refs log tree commit diff
path: root/src/libstd/ffi
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/ffi')
-rw-r--r--src/libstd/ffi/os_str.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index feace0bd702..84149a2eb8e 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -104,7 +104,7 @@ impl ops::Deref for OsString {
 
     #[inline]
     fn deref(&self) -> &OsStr {
-        &self[]
+        &self[..]
     }
 }
 
@@ -286,7 +286,7 @@ impl Debug for OsStr {
 }
 
 impl Borrow<OsStr> for OsString {
-    fn borrow(&self) -> &OsStr { &self[] }
+    fn borrow(&self) -> &OsStr { &self[..] }
 }
 
 impl ToOwned for OsStr {
@@ -308,7 +308,7 @@ impl AsOsStr for OsStr {
 
 impl AsOsStr for OsString {
     fn as_os_str(&self) -> &OsStr {
-        &self[]
+        &self[..]
     }
 }
 
@@ -320,7 +320,7 @@ impl AsOsStr for str {
 
 impl AsOsStr for String {
     fn as_os_str(&self) -> &OsStr {
-        OsStr::from_str(&self[])
+        OsStr::from_str(&self[..])
     }
 }