Skip to content

Commit 80c12d5

Browse files
Recurse through T while anonymizing &T (pgcentralfoundation#2212)
1 parent 7be889f commit 80c12d5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pgrx-sql-entity-graph/src/lifetimes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ pub fn anonymize_lifetimes(value: &mut syn::Type) {
5151
if let Some(lifetime) = type_ref.lifetime.as_mut() {
5252
lifetime.ident = syn::Ident::new("_", lifetime.ident.span());
5353
}
54+
// &'a T could be &'a &'b U so recurse to get &&U
55+
anonymize_lifetimes(&mut type_ref.elem);
5456
}
5557
syn::Type::Tuple(type_tuple) => type_tuple.elems.iter_mut().for_each(anonymize_lifetimes),
5658
_ => {}

0 commit comments

Comments
 (0)