about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-04-04 10:53:37 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-04-04 10:53:37 +0530
commitcf2773e32796bd2baf8bc4b3c3626ede264947b6 (patch)
tree480d435796b9d5fa75cfb91c7293f3bde135e280
parentd0c32834f412b78967d035c0ae739dfba8483936 (diff)
parent6529872afcd4934cd16202a67c747df6674f76c6 (diff)
downloadrust-cf2773e32796bd2baf8bc4b3c3626ede264947b6.tar.gz
rust-cf2773e32796bd2baf8bc4b3c3626ede264947b6.zip
Rollup merge of #23995 - aturon:cow-as-ref, r=huonw
 The existing impl had the too-strong requirement of `Clone`, when only
`ToOwned` was needed.
-rw-r--r--src/libcollections/borrow.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcollections/borrow.rs b/src/libcollections/borrow.rs
index 2fe769b73f5..4503ad14e92 100644
--- a/src/libcollections/borrow.rs
+++ b/src/libcollections/borrow.rs
@@ -342,7 +342,7 @@ impl<'a,  B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T: Clone> AsRef<T> for Cow<'a, T> {
+impl<'a, T: ?Sized + ToOwned> AsRef<T> for Cow<'a, T> {
     fn as_ref(&self) -> &T {
         self
     }