1 #### Note: this error code is no longer emitted by the compiler.
3 In-band lifetimes cannot be used in `fn`/`Fn` syntax.
5 Erroneous code examples:
7 ```ignore (feature got removed)
8 #![feature(in_band_lifetimes)]
10 fn foo(x: fn(&'a u32)) {} // error!
12 fn bar(x: &Fn(&'a u32)) {} // error!
14 fn baz(x: fn(&'a u32), y: &'a u32) {} // error!
16 struct Foo<'a> { x: &'a u32 }
19 fn bar(&self, x: fn(&'a u32)) {} // error!
23 Lifetimes used in `fn` or `Fn` syntax must be explicitly
24 declared using `<...>` binders. For example:
27 fn foo<'a>(x: fn(&'a u32)) {} // ok!
29 fn bar<'a>(x: &Fn(&'a u32)) {} // ok!
31 fn baz<'a>(x: fn(&'a u32), y: &'a u32) {} // ok!
33 struct Foo<'a> { x: &'a u32 }
36 fn bar(&self, x: fn(&'a u32)) {} // ok!