Skip to content

Conversation

@nnethercote
Copy link
Collaborator

@nnethercote nnethercote commented Dec 1, 2025

cargo doc currently generates hundreds of warnings on cust_raw. This PR fixes them.

In `cust_raw`, we derive `PartialEq`/`Eq`/`PartialOrd`/`Ord` for all
types by default. However, `cudaHostNodeParams` and
`cudaHostNodeParamsV2` each contain a raw pointer, which causes this
warning:
```
function pointer comparisons do not produce meaningful results since
their addresses are not guaranteed to be unique
```

bindgen has a `no_partialeq` function that disables all of these derives
for relevant types. Only `PartialOrd`/`Ord` cause a problem, but there
is no easy way to disable those while keeping `PartialEq`/`Eq`, so this
will have to do. We already use `no_partialeq` for
`CUDA_HOST_NODE_PARAMS.*` and various other types.
Even with doxygen-binding, there are hundreds of warnings, due to (a)
bad Doxygen formatting in the CUDA comments, and (b) shortcomings in
doxygen-bindgen. Fixing these would be difficult, so disabling comments
entirely seems easier. This also removes the dependency on
doxygen-bindgen.
Now that all the warnings have been fixed.
@nnethercote nnethercote marked this pull request as ready for review December 2, 2025 22:51
@nnethercote nnethercote requested a review from LegNeato December 2, 2025 22:51
@LegNeato LegNeato merged commit 58ee34a into Rust-GPU:main Dec 3, 2025
7 checks passed
@nnethercote nnethercote deleted the cargo-doc-cust_raw branch December 3, 2025 21:10
nnethercote added a commit to nnethercote/Rust-CUDA that referenced this pull request Dec 3, 2025
These should have been removed in Rust-GPU#330.
nnethercote added a commit to nnethercote/Rust-CUDA that referenced this pull request Dec 4, 2025
These should have been removed in Rust-GPU#330.
LegNeato pushed a commit that referenced this pull request Dec 5, 2025
These should have been removed in #330.
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