Skip to content

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

Merged
LegNeato merged 1 commit into
Rust-GPU:mainfrom
jorge-ortega:bindings-must-use
Apr 10, 2025
Merged

refactor(cust_raw): Add must_use attrbuites on result/error types.#195
LegNeato merged 1 commit into
Rust-GPU:mainfrom
jorge-ortega:bindings-must-use

Conversation

@jorge-ortega
Copy link
Copy Markdown
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