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>
Fri, 24 Jun 2022 21:27:19 +0000 (21:27 +0000)
commita31e02423b63303803a5383f52cb1c3e701e7df4
tree7a738408833a5acf26505a5d20703d9d7889b187
parenta70396773929cf3bd6e0f59f2562e34554490d46
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