Use trait, not impl, definition for X_as_Trait functions
authorMatt Corallo <git@bluematt.me>
Fri, 23 Sep 2022 16:18:55 +0000 (16:18 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 23 Sep 2022 16:25:21 +0000 (16:25 +0000)
commita5137ff3bd343300a902be14aa4315fd4ac37353
tree2c3800c33bb373d7c7fd927aca2e07f74c78bdca
parentf180d14d64d6513b9c96573075680b2b1b9b92f3
Use trait, not impl, definition for X_as_Trait functions

When we map a trait impl block, we historically didn't know how to
resolve the types in the trait context, so we just used the impl
context definitions and assumed the types were the same. Sadly, if
we have an associated type that is bounded by a trait, we need to
use the trait bound to figure out what to write for the X_as_Trait
method declarations.

Since we now have the ability to generate full trait-context type
resolvers, we do so here.
c-bindings-gen/src/main.rs