Skip to content

sdl2 compilation fails due to obsolete syntax #266

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

Closed
itegmark opened this issue Jan 7, 2015 · 2 comments
Closed

sdl2 compilation fails due to obsolete syntax #266

itegmark opened this issue Jan 7, 2015 · 2 comments

Comments

@itegmark
Copy link

itegmark commented Jan 7, 2015

$ cargo build
Updating registry https://github.com/rust-lang/crates.io-index
Downloading pkg-config v0.1.3
Downloading sdl2 v0.0.14
Downloading sdl2-sys v0.0.14
Compiling pkg-config v0.1.3
Compiling sdl2-sys v0.0.14
Compiling sdl2 v0.0.14
src\sdl2\surface.rs:111:37: 111:38 error: obsolete syntax: |uint| -> bool closure type syntax
src\sdl2\surface.rs:111 pub fn with_lock(&mut self, f: |pixels: &mut [u8]| -> R) -> R {
^
note: use unboxed closures instead, no type annotation needed
src\sdl2\timer.rs:33:37: 33:38 error: obsolete syntax: |uint| -> bool closure type syntax
src\sdl2\timer.rs:33 pub fn new(delay: uint, callback: ||: 'a -> uint, remove_on_drop: bool) -> Timer<'a> {
^
note: use unboxed closures instead, no type annotation needed
src\sdl2\timer.rs:77:14: 77:17 error: obsolete syntax: |uint| -> bool closure type syntax
src\sdl2\timer.rs:77 let f : &mut || -> uint = unsafe { mem::transmute(param) };
^~~
src\sdl2\render.rs:618:53: 618:54 error: obsolete syntax: |uint| -> bool closure type syntax
src\sdl2\render.rs:618 pub fn with_lock(&self, rect: Option, func: |CVec, i32| -> ()) -> SdlResult<()> {
^
note: use unboxed closures instead, no type annotation needed
src\sdl2\render.rs:652:36: 652:37 error: obsolete syntax: |uint| -> bool closure type syntax
src\sdl2\render.rs:652 pub fn gl_with_bind(&self, f: |tex_w: f64, tex_h: f64| -> R) -> R {
^
error: aborting due to 5 previous errors
Could not compile sdl2.

To learn more, run the command again with --verbose.

@ketsuban
Copy link

ketsuban commented Jan 7, 2015

This will be resolved when pull request #265 is merged.

@AngryLawyer
Copy link
Member

All fixed, cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants