diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-04-04 10:53:37 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-04-04 10:53:37 +0530 |
| commit | cf2773e32796bd2baf8bc4b3c3626ede264947b6 (patch) | |
| tree | 480d435796b9d5fa75cfb91c7293f3bde135e280 | |
| parent | d0c32834f412b78967d035c0ae739dfba8483936 (diff) | |
| parent | 6529872afcd4934cd16202a67c747df6674f76c6 (diff) | |
| download | rust-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.rs | 2 |
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 } |
