Skip to content

refactor(cust_raw): Add must_use attrbuites on result/error types. #195

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

jorge-ortega
Copy link
Collaborator

CUDA libraries have different result types (CUresult, cudaError_t, etc.) that must be checked after calling the function. This change adds must_use attribute on those types and functions that return that type when generating the bindings. This also fixes the warnings caused by this in places where the result type was not checked by either checking the result type, or ignore the value.

CUDA libraries have different result types (`CUresult`, `cudaError_t`, etc.) that must be checked after calling the function. This change adds `must_use` attribute on those types and functions that return that type when generating the bindings. This also fixes the warnings caused by this in places where the result type was not checked by either checking the result type, or ignore the value.
@LegNeato LegNeato merged commit b610c7e into Rust-GPU:main Apr 10, 2025
4 checks passed
@jorge-ortega jorge-ortega deleted the bindings-must-use branch April 15, 2025 07:08
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.

2 participants