about summary refs log tree commit diff
path: root/src/libstd/ffi
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-18 15:34:32 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-18 15:34:48 -0800
commit2cdbd288ac0606902885434e1ccd8d8bde68913d (patch)
tree9a7d37f7dd44424182797c76d49ba0ece99f9513 /src/libstd/ffi
parent365bd9a9e3b9dafa98e26982353fd28a6ca1efef (diff)
parenta99e698628cbd396c8100ef776d10ac61d911847 (diff)
downloadrust-2cdbd288ac0606902885434e1ccd8d8bde68913d.tar.gz
rust-2cdbd288ac0606902885434e1ccd8d8bde68913d.zip
rollup merge of #22210: aturon/stab-final-borrow
Conflicts:
	src/libcollections/btree/map.rs
	src/libcollections/str.rs
	src/libcollections/vec.rs
	src/libcore/borrow.rs
	src/libcore/hash/mod.rs
	src/libstd/collections/hash/map.rs
	src/libstd/collections/hash/set.rs
Diffstat (limited to 'src/libstd/ffi')
-rw-r--r--src/libstd/ffi/os_str.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs
index 4e50e1c293f..feace0bd702 100644
--- a/src/libstd/ffi/os_str.rs
+++ b/src/libstd/ffi/os_str.rs
@@ -34,7 +34,7 @@
 
 use core::prelude::*;
 
-use core::borrow::{BorrowFrom, ToOwned};
+use borrow::{Borrow, ToOwned};
 use fmt::{self, Debug};
 use mem;
 use string::{String, CowString};
@@ -285,11 +285,12 @@ impl Debug for OsStr {
     }
 }
 
-impl BorrowFrom<OsString> for OsStr {
-    fn borrow_from(owned: &OsString) -> &OsStr { &owned[] }
+impl Borrow<OsStr> for OsString {
+    fn borrow(&self) -> &OsStr { &self[] }
 }
 
-impl ToOwned<OsString> for OsStr {
+impl ToOwned for OsStr {
+    type Owned = OsString;
     fn to_owned(&self) -> OsString { self.to_os_string() }
 }