projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b8a97c
)
Support `use ident;` in bindings
author
Matt Corallo
<git@bluematt.me>
Tue, 15 Sep 2020 22:28:08 +0000
(18:28 -0400)
committer
Matt Corallo
<git@bluematt.me>
Mon, 12 Oct 2020 16:17:26 +0000
(12:17 -0400)
Somehow we'd never had any cases of it and it requires an extra
(trivial) match arm.
c-bindings-gen/src/types.rs
patch
|
blob
|
history
diff --git
a/c-bindings-gen/src/types.rs
b/c-bindings-gen/src/types.rs
index 56bb4e67bc9411be155147a5af24ee920ac7545b..1db824d43128fc7675de4f7d6e0a3aaaa89c3056 100644
(file)
--- 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!() }