From 1336cd8c417ee76132fb647c8d660c35fa7266b7 Mon Sep 17 00:00:00 2001 From: Devin Ragotzy Date: Thu, 6 Aug 2020 11:00:11 -0400 Subject: [PATCH] Handle tuple types in collect_lifetime_idents --- ruma-api-macros/src/util.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruma-api-macros/src/util.rs b/ruma-api-macros/src/util.rs index 8aecaa57..528d7e3c 100644 --- a/ruma-api-macros/src/util.rs +++ b/ruma-api-macros/src/util.rs @@ -43,6 +43,11 @@ pub fn collect_lifetime_ident(lifetimes: &mut BTreeSet, ty: &Type) { lifetimes.insert(lt.clone()); } } + Type::Tuple(syn::TypeTuple { elems, .. }) => { + for ty in elems { + collect_lifetime_ident(lifetimes, ty) + } + } _ => {} } }