3 // @has foo/trait.LendingIterator.html
4 pub trait LendingIterator {
5 // @has - '//*[@id="associatedtype.Item"]//h4[@class="code-header"]' "type Item<'a> where Self: 'a"
6 type Item<'a> where Self: 'a;
8 // @has - '//*[@id="tymethod.next"]//h4[@class="code-header"]' \
9 // "fn next<'a>(&'a self) -> Self::Item<'a>"
10 // @has - '//*[@id="tymethod.next"]//h4[@class="code-header"]//a[@href="trait.LendingIterator.html#associatedtype.Item"]' \
12 fn next<'a>(&'a self) -> Self::Item<'a>;
15 // @has foo/trait.LendingIterator.html
16 // @has - '//*[@id="associatedtype.Item-1"]//h4[@class="code-header"]' "type Item<'a> = ()"
17 impl LendingIterator for () {
20 fn next<'a>(&self) -> () {}
23 pub struct Infinite<T>(T);
25 // @has foo/trait.LendingIterator.html
26 // @has - '//*[@id="associatedtype.Item-2"]//h4[@class="code-header"]' "type Item<'a> where Self: 'a = &'a T"
27 impl<T> LendingIterator for Infinite<T> {
28 type Item<'a> where Self: 'a = &'a T;
30 fn next<'a>(&'a self) -> Self::Item<'a> {