From b5cc72e8ce49dc692e5c1eea3b6db963e6b677d2 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 15 Apr 2021 13:10:22 -0400 Subject: [PATCH] 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. --- c-bindings-gen/src/types.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); } } }, -- 2.39.5