Closed
Description
When using lifetime parameters in a struct, I get these errors:
missing lifetime specifier
at the declaration of the struct
and
use of undeclared lifetime name 'a
at the impl block
minimal example:
#[macro_use]
extern crate gdnative
#[derive(gdnative::NativeClass)]
#[inherit(gdnative::Node)]
struct Test<'a> {
this_is_a_reference: &'a i32,
}
#[methods]
impl<'a> Test<'a> {
fn _init(_owner: gdnative::Node) -> Self {
Test {
this_is_a_reference: &1
}
}
}
Without the macros it works fine.