]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-region-erasure-issue-20582.rs
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / 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 }