From c66ae6b77e6303400ad539750973b0851aae499c Mon Sep 17 00:00:00 2001 From: Maik Klein Date: Wed, 27 Feb 2019 11:05:33 +0100 Subject: [PATCH] Add lifetime to push_next --- generator/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/src/lib.rs b/generator/src/lib.rs index b56291a..2875c95 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -1595,7 +1595,7 @@ pub fn derive_setters( let next_function = if has_next && next_extends.is_none() { quote! { /// Prepend - pub fn push_next(mut self, next: &mut T) -> #name_builder<'a> { + pub fn push_next(mut self, next: &'a mut T) -> #name_builder<'a> { unsafe{ let next_ptr = next.as_ptr_mut(); (*next_ptr).p_next = self.inner.p_next as _;