mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
[bindings] Resolve type aliases mapped as opaque types
We already map type aliases which alias private types as opaque, but we don't resolve them like we would any other opaque type, preventing conversion printing or type use.
This commit is contained in:
parent
f3ce70660d
commit
842d2f6ce7
1 changed files with 15 additions and 0 deletions
|
@ -383,6 +383,21 @@ impl<'mod_lifetime, 'crate_lft: 'mod_lifetime> ImportResolver<'mod_lifetime, 'cr
|
|||
}
|
||||
}
|
||||
},
|
||||
syn::Item::Type(t) if export_status(&t.attrs) == ExportStatus::Export => {
|
||||
if let syn::Visibility::Public(_) = t.vis {
|
||||
let mut process_alias = true;
|
||||
for tok in t.generics.params.iter() {
|
||||
if let syn::GenericParam::Lifetime(_) = tok {}
|
||||
else { process_alias = false; }
|
||||
}
|
||||
if process_alias {
|
||||
match &*t.ty {
|
||||
syn::Type::Path(_) => { declared.insert(t.ident.clone(), DeclType::StructImported); },
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
syn::Item::Enum(e) => {
|
||||
if let syn::Visibility::Public(_) = e.vis {
|
||||
match export_status(&e.attrs) {
|
||||
|
|
Loading…
Add table
Reference in a new issue