]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/static-return-lifetime-infered.rs
Remove licenses
[rust.git] / src / test / ui / impl-trait / static-return-lifetime-infered.rs
1 struct A {
2     x: [(u32, u32); 10]
3 }
4
5 impl A {
6     fn iter_values_anon(&self) -> impl Iterator<Item=u32> {
7         self.x.iter().map(|a| a.0)
8     }
9     //~^^ ERROR cannot infer an appropriate lifetime
10     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {
11         self.x.iter().map(|a| a.0)
12     }
13     //~^^ ERROR cannot infer an appropriate lifetime
14 }
15
16 fn main() {}