]> git.bitcoin.ninja Git - rust-lightning/commit
[bindings] Replace associated_types HashMaps with common Generics
authorMatt Corallo <git@bluematt.me>
Wed, 25 Nov 2020 02:27:52 +0000 (21:27 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 4 Jan 2021 17:40:40 +0000 (12:40 -0500)
commitf2d042290822344064a964b8ddce77525fd4d1b4
treef62e9882b4ad0ae9272641ddba99aff07e07a24f
parent01e494d1ef16a213c057a871b4832e0cfee3afac
[bindings] Replace associated_types HashMaps with common Generics

Instead of handling associated types separately, we can just shove
them into the same generics resolution logic we use for template
types. While we should probably have some precedence logic,
aliasing type names seems like a bad idea anyway so no effort is
made to handle it.

This removes a good chunk of code and, more importantly, tees us up
for supporting `Type<Self::AssociatedType>`-style generics.
c-bindings-gen/src/blocks.rs
c-bindings-gen/src/main.rs
c-bindings-gen/src/types.rs