]> git.lizzy.rs Git - rust.git/blob - tests/ui/associated-types/associated-types-region-erasure-issue-20582.rs
Rollup merge of #106106 - jyn514:remote-tracking-branch, r=Mark-Simulacrum
[rust.git] / tests / ui / associated-types / associated-types-region-erasure-issue-20582.rs
1 // run-pass
2 #![allow(dead_code)]
3 // Regression test for #20582. This test caused an ICE related to
4 // inconsistent region erasure in codegen.
5
6 // pretty-expanded FIXME #23616
7
8 struct Foo<'a> {
9     buf: &'a[u8]
10 }
11
12 impl<'a> Iterator for Foo<'a> {
13     type Item = &'a[u8];
14
15     fn next(&mut self) -> Option<<Self as Iterator>::Item> {
16         Some(self.buf)
17     }
18 }
19
20 fn main() {
21 }