rust/tests/ui/suggestions/fn-missing-lifetime-in-item.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
558 B
Rust
Raw Normal View History

2020-01-27 14:49:12 -06:00
struct S1<F: Fn(&i32, &i32) -> &'a i32>(F); //~ ERROR use of undeclared lifetime name `'a`
struct S2<F: Fn(&i32, &i32) -> &i32>(F); //~ ERROR missing lifetime specifier
struct S3<F: for<'a> Fn(&i32, &i32) -> &'a i32>(F);
//~^ ERROR binding for associated type `Output` references lifetime `'a`, which does not appear
struct S4<F: for<'x> Fn(&'x i32, &'x i32) -> &'x i32>(F);
const C: Option<Box<dyn for<'a> Fn(&usize, &usize) -> &'a usize>> = None;
//~^ ERROR binding for associated type `Output` references lifetime `'a`, which does not appear
fn main() {}