From: Matt Corallo Date: Thu, 15 Apr 2021 17:10:22 +0000 (-0400) Subject: Handle type aliases which are used in the same file as declared. X-Git-Tag: v0.0.98~15^2~3 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=b5cc72e8ce49dc692e5c1eea3b6db963e6b677d2;p=ldk-c-bindings Handle type aliases which are used in the same file as declared. We previously only handled type aliases correctly when they were declared in a different file and imported. --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 92da872..16f3ff5 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -413,10 +413,7 @@ impl<'mod_lifetime, 'crate_lft: 'mod_lifetime> ImportResolver<'mod_lifetime, 'cr else { process_alias = false; } } if process_alias { - match &*t.ty { - syn::Type::Path(_) => { declared.insert(t.ident.clone(), DeclType::StructImported); }, - _ => {}, - } + declared.insert(t.ident.clone(), DeclType::StructImported); } } },