]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/fn-missing-lifetime-in-item.rs
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / fn-missing-lifetime-in-item.rs
1 struct S1<F: Fn(&i32, &i32) -> &'a i32>(F); //~ ERROR use of undeclared lifetime name `'a`
2 struct S2<F: Fn(&i32, &i32) -> &i32>(F); //~ ERROR missing lifetime specifier
3 struct S3<F: for<'a> Fn(&i32, &i32) -> &'a i32>(F);
4 //~^ ERROR binding for associated type `Output` references lifetime `'a`, which does not appear
5 struct S4<F: for<'x> Fn(&'x i32, &'x i32) -> &'x i32>(F);
6 const C: Option<Box<dyn for<'a> Fn(&usize, &usize) -> &'a usize>> = None;
7 //~^ ERROR binding for associated type `Output` references lifetime `'a`, which does not appear
8 fn main() {}