]> 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>
Fri, 15 Jan 2021 00:49:14 +0000 (19:49 -0500)
commit4036668954101681199ef9718f619b5591f472ca
tree040e3b9b26dabc225ad66fb6221b17800925873d
parent1d3e71fc7086874bdeae52f93cc950e570d5bc06
[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