]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/issue-84931.rs
Rollup merge of #102954 - GuillaumeGomez:cfg-hide-attr-checks, r=Manishearth
[rust.git] / src / test / ui / generic-associated-types / issue-84931.rs
1 // check-fail
2
3 trait StreamingIter {
4     type Item<'a> where Self: 'a;
5     fn next<'a>(&'a mut self) -> Option<Self::Item::<'a>>;
6 }
7
8 struct StreamingSliceIter<'a, T> {
9     idx: usize,
10     data: &'a mut [T],
11 }
12
13 impl<'b, T: 'b> StreamingIter for StreamingSliceIter<'b, T> {
14     type Item<'a> = &'a mut T;
15     //~^ the parameter type
16     fn next(&mut self) -> Option<&mut T> {
17         loop {}
18     }
19 }
20
21 fn main() {}