From 16b9309e7c2ec7c0fc18e46fac1abba0ec1eaa32 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 15 Sep 2020 18:28:08 -0400 Subject: [PATCH] Support `use ident;` in bindings Somehow we'd never had any cases of it and it requires an extra (trivial) match arm. --- c-bindings-gen/src/types.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index 56bb4e67b..1db824d43 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -813,6 +813,10 @@ impl<'a, 'c: 'a> TypeResolver<'a, 'c> { let new_path = format!("{}", p.ident); self.process_use_intern(w, &p.tree, &new_path); }, + syn::UseTree::Name(n) => { + let full_path = format!("{}", n.ident); + self.imports.insert(n.ident.clone(), full_path); + }, _ => unimplemented!(), } if u.leading_colon.is_some() { unimplemented!() } -- 2.39.5