You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#![feature(associated_types)]use std::slice;traitBound{}impl<'a>Boundfor&'aint{}traitIntoIterator{typeIter:Iterator;fninto_iter(self) -> Self::Iter;}impl<'a,T>IntoIteratorfor&'a[T;3]{typeIter = slice::Iter<'a,T>;fninto_iter(self) -> slice::Iter<'a,T>{self.iter()}}fnfoo<X>(x:X)whereX:IntoIterator,
<<XasIntoIterator>::IterasIterator>::Item:Bound,{}fnbar<T,I,X>(x:X)whereT:Bound,I:Iterator<Item=T>,X:IntoIterator<Iter=I>,{}fnmain(){foo(&[0i,1,2]);//~^ error: the trait `Bound` is not implemented for the type `<<&[int; 3] as IntoIterator>::Iter as core::iter::Iterator>::Item`bar(&[0i,1,2]);}
STR
Version
rustc 1.0.0-dev (340ac040f 2015-01-06 08:25:32 +0000)
foo
andbar
should beare equivalent, butfoo
doesn't work.cc @nikomatsakis
The text was updated successfully, but these errors were encountered: