You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling sdl2_image v0.6.0
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:73:37: 73:95 error: mismatched types:
expected `*const i8`,
found `*const u8`
(expected i8,
found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:73 let raw = ffi::IMG_Load(CString::new(filename.to_str().unwrap()).unwrap().as_ptr());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:73:37: 73:95 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:99:55: 99:113 error: mismatched types:
expected `*const i8`,
found `*const u8`
(expected i8,
found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:99 let status = ffi::IMG_SavePNG(self.raw(), CString::new(filename.to_str().unwrap()).unwrap().as_ptr());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:99:55: 99:113 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:131:56: 131:114 error: mismatched types:
expected `*const i8`,
found `*const u8`
(expected i8,
found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:131 let raw = ffi::IMG_LoadTexture(self.raw(), CString::new(filename.to_str().unwrap()).unwrap().as_ptr());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:131:56: 131:114 help: run `rustc --explain E0308` to see a detailed explanation
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:218:50: 218:98 error: mismatched types:
expected `*const i8`,
found `*const u8`
(expected i8,
found u8) [E0308]
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:218 ffi::IMG_LoadTyped_RW(self.raw(), 0, CString::new(_type.as_bytes()).unwrap().as_ptr())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/odroid/.cargo/registry/src/github.com-48ad6e4054423464/sdl2_image-0.6.0/src/sdl2_image/lib.rs:218:50: 218:98 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to 4 previous errors
A mechanical cast as *const _ seems to be enough of a fix in most cases.
Rust 1.5 is still fine.
The text was updated successfully, but these errors were encountered:
Due to this issue the crate no longer compiles:
A mechanical cast
as *const _
seems to be enough of a fix in most cases.Rust 1.5 is still fine.
The text was updated successfully, but these errors were encountered: