]> 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>
Tue, 2 Feb 2021 22:04:31 +0000 (17:04 -0500)
commit086434f0c5a2447534cbacb0c88fab40ebdab859
treef552de14f603df95a1c236bd390b8e604175956b
parent70440a529eb31370fdad626932b882d20fa50b7a
[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