Skip to content
New issue

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

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

Already on GitHub? # to your account

PhantomPinned should be ignored just like PhantomData<T> #694

Closed
kkoning opened this issue Jun 18, 2021 · 1 comment
Closed

PhantomPinned should be ignored just like PhantomData<T> #694

kkoning opened this issue Jun 18, 2021 · 1 comment

Comments

@kkoning
Copy link
Contributor

kkoning commented Jun 18, 2021

cbindgen already ignores any item of type PhantomData. It should also ignore anything that's PhantomPinned for the same reason.

This looks like it's just as simple as adding a one-liner in src/bindgen/ir/ty.rs at line 401 extending the predicate to include PhantomPinned. Or, at least, that worked for me. But perhaps it also should be added to some tests?

@emilio
Copy link
Collaborator

emilio commented Jun 18, 2021

Yeah, that seems fine. I'd totally take that one-liner with at least a test tweaked (there aren't that many test that use PhantomData so just tweaking them to also use PhantomPinned seems good enough).

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants