]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/static-return-lifetime-infered.rs
Rollup merge of #93885 - Badel2:error-download-ci-llvm, r=Mark-Simulacrum
[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         //~^ ERROR: captures lifetime that does not appear in bounds
8         //~| ERROR: captures lifetime that does not appear in bounds
9         self.x.iter().map(|a| a.0)
10     }
11     fn iter_values<'a>(&'a self) -> impl Iterator<Item=u32> {
12         //~^ ERROR: captures lifetime that does not appear in bounds
13         //~| ERROR: captures lifetime that does not appear in bounds
14         self.x.iter().map(|a| a.0)
15     }
16 }
17
18 fn main() {}