rust/tests/ui/issues/issue-23958.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
257 B
Rust
Raw Normal View History

//@ 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();
}