-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Re-export c_void from std::os::raw #71
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
Conversation
This avoid silly errors like: ``` error: mismatched types: expected `*mut libc::c_void`, found `*mut std::os::raw::c_void` ``` and should have no other effect since the two definitions were identical.
Where I’m at it, should everything else from |
The CI is failing here for the reason actually for why this was not done in the first place. I explained a bit more in #59 and this was also mentioned in the RFC, but for now this is intentional, so closing. |
… and re-export at the old location. This is primarily motivated by rust-lang/libc#71 (to support src/liblibc), but also because why not.
This is causing so much pain :( |
I’ve been fighting with the same error all over the place for days:
|
Can you elaborate on why that's coming up? That sounds like some dependencies started transitioning to using |
Yes, exactly. And this is happening across dozens of crates and repositories. Every time I update any dependency, I end up sending lots of PRs to fix precisely this error, sometimes by changing nothing but a version number in |
How does changing a version fix things? Both 0.1 and 0.2 define |
For example, library A has a public function that takes a It’s frustrating because the exact definition of If Anyway, now that libc 0.1 and 0.2 are as they are I don’t have a solution to propose that would help here. I’m mostly just ranting to vent frustration, sorry. |
@alexcrichton Are you still opposed to this? The reason you linked to above says “In order to have maximal compatibility with all Rust versions”. |
Yes I would still be opposed to this. This doesn't make sense when libc's default mode of operation is no_std, which it should be. The discussion about c_void specifically is broad and far reaching, I'd recommend reading https://internals.rust-lang.org/t/solve-std-os-raw-c-void/3268 |
This avoid silly errors like:
and should have no other effect since the two definitions were identical.
CC servo/servo#8446