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

Fix safety comment for LibraryHandle::get_proc_address #1010

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

NobodyXu
Copy link
Collaborator

@NobodyXu NobodyXu commented Mar 15, 2024

Fix #957 (comment)

I can't add lifetime to the return type directly, I can only add bound to the generic F.

However, I don't think we can add lifetime to function pointer, a newtype that dereferences to F would have the same problem since function pointer is copyable, so the only option is to add a safety comment for this unsafe function.

@NobodyXu NobodyXu marked this pull request as ready for review March 15, 2024 01:57
@NobodyXu NobodyXu merged commit 77a54a9 into main Mar 15, 2024
42 checks passed
@NobodyXu NobodyXu deleted the NobodyXu-patch-1 branch March 15, 2024 01:58
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.

1 participant