Use new `Type`-based generic resolution in `write_rust_path`
authorMatt Corallo <git@bluematt.me>
Sat, 18 Jun 2022 19:39:59 +0000 (19:39 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 28 Jun 2022 17:16:28 +0000 (17:16 +0000)
commit995561a6e039d662ca2726ea455de158ffde154f
tree68c95c5e8188f4004e090b7eeb5a5375b1fcb71b
parent257e3956c377b9610bc01925ceecca450d8735cc
Use new `Type`-based generic resolution in `write_rust_path`

This gives us better generic resolution, but because we determine
whether to include a `crate::` prefix or not based on generic
resolution it means we have to pipe through the "type is a generic that
was resolved" flag from `write_rust_type`. We also take this opporunity
to do better decision making for the `crate::` prefix entirely, which
is important for enums that contain trait instances.
c-bindings-gen/src/types.rs