Skip to content
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

Incorrect type alias generated from curl/lib/setopt.c #74

Closed
thedataking opened this issue Apr 19, 2019 · 2 comments
Closed

Incorrect type alias generated from curl/lib/setopt.c #74

thedataking opened this issue Apr 19, 2019 · 2 comments
Assignees
Labels
blocked Cannot be supported without external support first

Comments

@thedataking
Copy link
Contributor

thedataking commented Apr 19, 2019

Generated:

pub type CURLU = Curl_URL;

Expected (insofar that it allows compilation to proceed):

pub type CURLU = crate::urlapi::Curl_URL;
@thedataking thedataking added the bug Something isn't working label Apr 19, 2019
@rinon rinon self-assigned this Apr 19, 2019
@rinon
Copy link
Contributor

rinon commented Apr 30, 2019

The actual error here is that *mut CURLU is unsized:

error[E0277]: the size for values of type `setopt::Curl_URL` cannot be known at compilation time
    --> src/setopt.rs:5823:43
     |
5823 |         10282 => { (*data).set.uh = param.arg::<*mut CURLU>() }
     |                                           ^^^ doesn't have a size known at compile-time
     |
     = help: the trait `std::marker::Sized` is not implemented for `setopt::Curl_URL`
     = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
     = note: required because of the requirements on the impl of `core::ffi::sealed_trait::VaArgSafe` for `*mut setopt::Curl_URL`

We should implement VaArgSafe for raw pointers to unsized types, but this will need to be upstreamed.

@rinon rinon assigned ahomescu and unassigned rinon Apr 30, 2019
@rinon rinon added blocked Cannot be supported without external support first and removed bug Something isn't working labels Apr 30, 2019
@rinon
Copy link
Contributor

rinon commented Oct 3, 2019

Blocked on upstream compiler support, see rust-lang/rust#61126

@rinon rinon closed this as completed in 71f3708 Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Cannot be supported without external support first
Projects
None yet
Development

No branches or pull requests

3 participants