From: Matt Corallo Date: Tue, 15 Sep 2020 22:28:08 +0000 (-0400) Subject: Support `use ident;` in bindings X-Git-Tag: v0.0.12~7^2~23 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=16b9309e7c2ec7c0fc18e46fac1abba0ec1eaa32;p=rust-lightning Support `use ident;` in bindings Somehow we'd never had any cases of it and it requires an extra (trivial) match arm. --- 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!() }