diff --git a/stabby-macros/src/traits.rs b/stabby-macros/src/traits.rs index 788ca0b..f9811f4 100644 --- a/stabby-macros/src/traits.rs +++ b/stabby-macros/src/traits.rs @@ -742,7 +742,6 @@ impl DynTraitDescription<'_> { } } #ext_ident :: < StabbyArbitraryType, #(#dyntrait_types,)* #(#unbound_trait_types,)* #(#unbound_trait_consts,)* > as for < - #(#trait_lts,)* #(#arg_lts,)* > #unsafety #abi fn (#receiver, ::core::marker::PhantomData<&#receiver_lt &'stabby_vt_lt ()>, #(#arg_tys,)*) #output })); @@ -807,6 +806,7 @@ impl DynTraitDescription<'_> { where StabbyArbitraryType: #trait_id <#(#unbound_trait_lts,)* #(#unbound_trait_types,)* #(#unbound_trait_consts,)* #(#trait_to_vt_bindings,)* >, #(#vt_bounds)* + #(#trait_lts: 'stabby_vt_lt,)* #(#unbound_trait_types: 'stabby_vt_lt,)* #(#dyntrait_types: 'stabby_vt_lt,)* { #[doc = #vt_doc] diff --git a/stabby/src/tests/traits.rs b/stabby/src/tests/traits.rs index 2fd7c96..b032cfc 100644 --- a/stabby/src/tests/traits.rs +++ b/stabby/src/tests/traits.rs @@ -108,6 +108,13 @@ impl MyTrait3> for u16 { extern "C" fn test2(&mut self) {} } +#[stabby::stabby(checked)] +pub trait MyTraitWithLt<'a> { + extern "C" fn return_lt(&self) -> &'a u8; + extern "C" fn take_and_return_lt(&self, with: &'a u8) -> &'a u8; + extern "C" fn named_and_trait_lt<'b>(&self, a: &'a u8, b: &'b u8); +} + #[stabby::stabby(checked)] pub trait AsyncRead { extern "C" fn read<'a>(