Skip to content

Commit eabfab6

Browse files
committed
Don't derive comparison traits for cudaHostNameParams.*.
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.
1 parent e4e5ed3 commit eabfab6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crates/cust_raw/build/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ fn create_cuda_runtime_bindings(
192192
.allowlist_type("^libraryPropertyType.*")
193193
.allowlist_var("^CU.*")
194194
.allowlist_function("^cu.*")
195+
.no_partialeq("cudaHostNodeParams.*")
195196
.default_enum_style(bindgen::EnumVariation::Rust {
196197
non_exhaustive: false,
197198
})

0 commit comments

Comments
 (0)