-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints
Description
I'm doing the following:
gl::load_with(|s| window.get_proc_address(s));which gives me
error: mismatched types:
expected `*const libc::c_void`,
found `*const ()`
So I added a cast:
gl::load_with(|s| window.get_proc_address(s) as *const libc::c_void);This results in:
error: mismatched types:
expected `*const libc::c_void`,
found `*const libc::types::common::c95::c_void`
And now I'm lost :D Why does it say it found *const libc::types::common::c95::c_void? I didn't write that. Apparently there's an older version of libc where libc::c_void is a re-export of the long type (durka42 told me that on IRC).
This is what I would expect the error message to look like:
error: mismatched types:
expected `*const libc::c_void`,
found `*const libc::c_void` aka `*const libc::types::common::c95::c_void`
This would still be a little bit confusing. Maybe include the version numbers somehow?
error: mismatched types:
expected `*const libc::c_void` with libc 0.2,
found `*const libc::c_void` aka `*const libc::types::common::c95::c_void` with libc 0.1
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lints