projects
/
ldk-c-bindings
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
170f4b6
)
Add locally defined crates as "dependencies" without `extern crate`
author
Matt Corallo
<git@bluematt.me>
Wed, 22 Jun 2022 19:59:45 +0000
(19:59 +0000)
committer
Matt Corallo
<git@bluematt.me>
Tue, 28 Jun 2022 17:16:28 +0000
(17:16 +0000)
We later use the `dependency` set when doing type resolution to
decide if `::asdf::T` means `current_crate::asdf::T` or `asdf::T`,
which will resolve incorrectly if we don't ensure all possible
crates are in the `dependencies` list.
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 bc015f04bd8ecf4ec4add92e3e4c76528b2940be..1a737d17cf11203ef1720015164d75ed7e3dd060 100644
(file)
--- a/
c-bindings-gen/src/types.rs
+++ b/
c-bindings-gen/src/types.rs
@@
-705,6
+705,7
@@
impl FullLibraryAST {
let modname = if module != "" {
module.clone() + "::" + &modident
} else {
+ self.dependencies.insert(m.ident);
modident.clone()
};
self.load_module(modname, m.attrs, m.content.unwrap().1);