Skip to content

handle deconstruct_hir_ty for function pointers#1019

Merged
oinoom merged 2 commits into
masterfrom
feat.fp.hypo
Aug 28, 2023
Merged

handle deconstruct_hir_ty for function pointers#1019
oinoom merged 2 commits into
masterfrom
feat.fp.hypo

Conversation

@oinoom
Copy link
Copy Markdown
Contributor

@oinoom oinoom commented Aug 9, 2023

Fixes #992. Prior to this we had no support for deconstructing the HIR ty of a function to get its arguments, which caused handle_ty to not generate any rewrites for function pointers in struct fields. This adds support for deconstructing the signatures by first asserting that the inputs and output of an HIR function signature match the length of the MIR function signature and then packages the inputs and outputs of the HIR signature into a vector.

@oinoom oinoom requested a review from spernsteiner August 9, 2023 17:05
@oinoom oinoom force-pushed the feat.fp.hypo branch 4 times, most recently from 3b6876d to f2815aa Compare August 9, 2023 17:19
Comment thread c2rust-analyze/src/rewrite/ty.rs
David Anekstein added 2 commits August 28, 2023 12:06
…ause we are rewriting an implicit return type of (). assert that this is not the case
@oinoom oinoom merged commit f22c692 into master Aug 28, 2023
@oinoom oinoom deleted the feat.fp.hypo branch August 28, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

analyze: missing hypothetical lifetimes within function pointer types

2 participants