Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the
device
module, all public items fromcl3::device
are re-exported. They even show up as public in the documentation. Nonetheless they aren't actually public.To reproduce this issue, try to import
opencl3::device::CL_UUID_SIZE_KHR
, you will get an error like:The private imports at
opencl3/src/device.rs
Line 18 in d004f1c
opencl3/src/device.rs
Line 15 in d004f1c
As most of the private imports are a subset of the public re-exports, we can just import the missing ones, which in this case is only
cl_device_feature_capabilities_intel
.In order verify the subset, you can copy the list of imports from
cl3::ext
and thecl3::device
re-exports fromopencl-sys
into two fiels and runtr ',' '\n|awk '{$1=$1;print}'|sort
on each of them and finally diff the results.I've never been a fan of glob imports, but I wasn't aware of that limitation in Rust. rust-lang/rust#31337 and https://rust-lang.github.io/rfcs/1560-name-resolution.html touches those topics in case someone is interested in all the details.
This is a regression, in earlier versions of
opencl3
opencl3::device::CL_UUID_SIZE_KHR.
used to be public.