Closed jmmk closed 9 years ago
Do you have a small amount of code which reproduces the error?
struct Foo {
listener: <'a> ||: 'a
}
impl Foo {
fn new(listener: <'a> ||: 'a) -> Foo {
Foo {
listener: listener
}
}
}
fn main() {
let a = Foo::new();
}
Thanks!
For future reference you probably don't want to store <'a> ||: 'a
but rather ||: 'a
struct Foo<'a> {
listener: ||: 'a
}
impl<'a> Foo<'a> {
fn new(listener: ||: 'a) -> Foo<'a> {
Foo { listener: listener }
}
}
fn main() {
let a = Foo::new(|| {});
}
cc @pnkfelix and @nikomatsakis
Updated code example
Original description
I added
pub listener: <'a> ||: 'a,
as a field on a struct and I am passinglistener: <'a> ||: 'a
into the constructor and settinglistener: listener
. My code is horribly broken at the moment, so the error might be hard to duplicate in a normal circumstance