blob: 7e90d75860071c7abf11f5f7c9cf965a8b2f02d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// run-pass
trait Collection where for<'a> &'a Self: IntoIterator {
fn my_iter(&self) -> <&Self as IntoIterator>::IntoIter {
self.into_iter()
}
}
impl<T> Collection for [T] { }
fn main() {
let v = [0usize];
let _ = v.my_iter();
}
|