Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a method to get the FnAbi of a function pointer #63

Open
celinval opened this issue Feb 22, 2024 · 3 comments · Fixed by rust-lang/rust#126722
Open

Add a method to get the FnAbi of a function pointer #63

celinval opened this issue Feb 22, 2024 · 3 comments · Fixed by rust-lang/rust#126722
Assignees
Labels
good first issue Good for newcomers

Comments

@celinval
Copy link
Contributor

celinval commented Feb 22, 2024

We have added a method to get the function ABI of an instance, however, that doesn't work for function pointers. We should consider adding a similar API to the query fn_abi_of_fn_ptr(/*..*/).

@oli-obk
Copy link
Contributor

oli-obk commented Feb 22, 2024

function pointer types have a fn sig field https://doc.rust-lang.org/nightly/nightly-rustc/stable_mir/ty/struct.FnSig.html that contains the ABI.

@celinval
Copy link
Contributor Author

celinval commented Feb 22, 2024

That just represents the ABI type not the argument's ABI though. I changed the title of this issue to avoid any confusion. Sorry about that!

@celinval celinval changed the title Add a method to get the ABI of a function pointer Add a method to get the FnAbi of a function pointer Feb 22, 2024
@celinval celinval added the good first issue Good for newcomers label Mar 1, 2024
@adwinwhite
Copy link

@rustbot claim

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Jun 22, 2024
Add method to get `FnAbi` of function pointer

Provide a StableMIR API to query `FnAbi` of a function pointer.

Fixes [rust-lang/project-stable-mir#63](rust-lang/project-stable-mir#63)
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Jun 22, 2024
Add method to get `FnAbi` of function pointer

Provide a StableMIR API to query `FnAbi` of a function pointer.

Fixes [rust-lang/project-stable-mir#63](rust-lang/project-stable-mir#63)
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jun 22, 2024
Rollup merge of rust-lang#126722 - adwinwhite:ptr_fn_abi, r=celinval

Add method to get `FnAbi` of function pointer

Provide a StableMIR API to query `FnAbi` of a function pointer.

Fixes [rust-lang/project-stable-mir#63](rust-lang/project-stable-mir#63)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants