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 02:26:57 +0000 (02:26 +0000)
commita8f15a04eb0c0c27ddcd46a0229be616f76186f3
treefa48e86899148eba6ad21c1f9a768096f783c59e
parentf6ed8872e34e02ebf279546aa51c20538a4237ad
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