immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.79k stars 219 forks source link

analyze: fix deconstruct_hir_ty adt/path case #1023

Closed spernsteiner closed 10 months ago

spernsteiner commented 10 months ago

Previously, type aliases for Option<*const T> caused a panic, as deconstruct_hir_ty would match the HIR alias with the MIR type Option<T> and then get confused due to the mismatched number of type arguments. With this fix, deconstruct_hir_ty will no longer match the HIR alias with the MIR type as the two have different DefIds.