We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 134e00b commit 64a4decCopy full SHA for 64a4dec
src/libcore/iter.rs
@@ -967,10 +967,9 @@ pub trait IteratorExt: Iterator + Sized {
967
/// Creates an iterator that clones the elements it yields. Useful for converting an
968
/// Iterator<&T> to an Iterator<T>.
969
#[unstable(feature = "core", reason = "recent addition")]
970
- fn cloned<T, D>(self) -> Cloned<Self> where
971
- Self: Iterator<Item=D>,
972
- D: Deref<Target=T>,
973
- T: Clone,
+ fn cloned(self) -> Cloned<Self> where
+ Self::Item: Deref,
+ <Self::Item as Deref>::Output: Clone,
974
{
975
Cloned { it: self }
976
}
0 commit comments