diff --git a/examples/audio-whitenoise.rs b/examples/audio-whitenoise.rs index fe065de8..b7fef4c1 100644 --- a/examples/audio-whitenoise.rs +++ b/examples/audio-whitenoise.rs @@ -1,3 +1,5 @@ +#![feature(rand)] + extern crate sdl2; use sdl2::audio::{AudioCallback, AudioSpecDesired}; diff --git a/examples/game_controller.rs b/examples/game_controller.rs index 8007c957..066793f7 100644 --- a/examples/game_controller.rs +++ b/examples/game_controller.rs @@ -1,3 +1,5 @@ +#![feature(io, std_misc, core)] + extern crate sdl2; use sdl2::{joystick, controller}; diff --git a/sdl2-sys/build.rs b/sdl2-sys/build.rs index e521f5b0..46531d30 100644 --- a/sdl2-sys/build.rs +++ b/sdl2-sys/build.rs @@ -1,3 +1,5 @@ +#![feature(os)] + extern crate "pkg-config" as pkg_config; fn main() { diff --git a/sdl2-sys/src/lib.rs b/sdl2-sys/src/lib.rs index 2a9a181c..4a0e5546 100644 --- a/sdl2-sys/src/lib.rs +++ b/sdl2-sys/src/lib.rs @@ -1,5 +1,7 @@ #![allow(non_camel_case_types)] +#![feature(core, libc)] + extern crate libc; pub mod scancode; diff --git a/sdl2-sys/src/rect.rs b/sdl2-sys/src/rect.rs index 7fa74cd0..e26955e8 100644 --- a/sdl2-sys/src/rect.rs +++ b/sdl2-sys/src/rect.rs @@ -6,7 +6,7 @@ use std::mem; use libc::c_int; /// A structure that defines a two dimensional point. -#[derive(PartialEq, Clone, Show, Copy)] +#[derive(PartialEq, Clone, Debug, Copy)] #[repr(C)] pub struct Point { pub x: i32, @@ -14,7 +14,7 @@ pub struct Point { } /// A structure that defines a rectangle, with the origin at the upper left. -#[derive(PartialEq, Clone, Show, Copy)] +#[derive(PartialEq, Clone, Debug, Copy)] #[repr(C)] pub struct Rect { pub x: i32, diff --git a/src/sdl2/audio.rs b/src/sdl2/audio.rs index 1c3c6e84..d2217862 100644 --- a/src/sdl2/audio.rs +++ b/src/sdl2/audio.rs @@ -33,7 +33,7 @@ pub const AUDIOS32SYS : AudioFormat = ll::AUDIO_S32SYS; pub const AUDIOF32SYS : AudioFormat = ll::AUDIO_F32SYS; #[repr(C)] -#[derive(Copy, Clone, PartialEq, Hash, Show, FromPrimitive)] +#[derive(Copy, Clone, PartialEq, Hash, Debug, FromPrimitive)] pub enum AudioStatus { Stopped = ll::SDL_AUDIO_STOPPED as isize, Playing = ll::SDL_AUDIO_PLAYING as isize, @@ -288,7 +288,7 @@ impl, CB: AudioCallback> AudioSpecDesired { } #[allow(missing_copy_implementations)] -#[derive(Show)] +#[derive(Debug)] pub struct AudioSpec { pub freq: i32, // TODO: Showing format should be prettier diff --git a/src/sdl2/controller.rs b/src/sdl2/controller.rs index 1e41d9bc..24d4c128 100644 --- a/src/sdl2/controller.rs +++ b/src/sdl2/controller.rs @@ -8,7 +8,7 @@ use joystick; use sys::controller as ll; use sys::event::{SDL_QUERY, SDL_ENABLE}; -#[derive(Copy, Clone, PartialEq, Show)] +#[derive(Copy, Clone, PartialEq, Debug)] #[repr(i32)] pub enum Axis { Invalid = ll::SDL_CONTROLLER_AXIS_INVALID, @@ -54,7 +54,7 @@ pub fn wrap_controller_axis(bitflags: u8) -> Axis { } } -#[derive(Copy, Clone, PartialEq, Show)] +#[derive(Copy, Clone, PartialEq, Debug)] #[repr(i32)] pub enum Button { Invalid = ll::SDL_CONTROLLER_BUTTON_INVALID, diff --git a/src/sdl2/event.rs b/src/sdl2/event.rs index f2d0bc64..de59acf1 100644 --- a/src/sdl2/event.rs +++ b/src/sdl2/event.rs @@ -82,7 +82,7 @@ pub enum EventType { Last = ll::SDL_LASTEVENT, } -#[derive(Copy, Clone, Show)] +#[derive(Copy, Clone, Debug)] /// An enum of window events. pub enum WindowEventId { None, diff --git a/src/sdl2/gesture.rs b/src/sdl2/gesture.rs index 2088940d..bf7c7e44 100644 --- a/src/sdl2/gesture.rs +++ b/src/sdl2/gesture.rs @@ -1 +1,2 @@ +#[allow(unused)] use sys::gesture as ll; diff --git a/src/sdl2/haptic.rs b/src/sdl2/haptic.rs index 9e15878f..e72ed7bd 100644 --- a/src/sdl2/haptic.rs +++ b/src/sdl2/haptic.rs @@ -1,2 +1,3 @@ //! Haptic Functions +#[allow(unused)] use sys::haptic as ll; diff --git a/src/sdl2/keycode.rs b/src/sdl2/keycode.rs index 282aaafb..c1ee5bda 100644 --- a/src/sdl2/keycode.rs +++ b/src/sdl2/keycode.rs @@ -3,7 +3,7 @@ use std::num::ToPrimitive; use sys::keycode as ll; -#[derive(PartialEq, Eq, FromPrimitive, Show, Copy)] +#[derive(PartialEq, Eq, FromPrimitive, Debug, Copy)] pub enum KeyCode { Unknown = ll::SDLK_UNKNOWN as isize, Backspace = ll::SDLK_BACKSPACE as isize, diff --git a/src/sdl2/lib.rs b/src/sdl2/lib.rs index 02646b29..238b6478 100644 --- a/src/sdl2/lib.rs +++ b/src/sdl2/lib.rs @@ -1,7 +1,7 @@ #![crate_name = "sdl2"] #![crate_type = "lib"] -#![feature(slicing_syntax, unsafe_destructor, optin_builtin_traits)] +#![feature(slicing_syntax, unsafe_destructor, optin_builtin_traits, std_misc, io, libc, hash, core, collections, rand, path)] extern crate libc; extern crate collections; diff --git a/src/sdl2/pixels.rs b/src/sdl2/pixels.rs index 6c1e5767..66e51d64 100644 --- a/src/sdl2/pixels.rs +++ b/src/sdl2/pixels.rs @@ -62,7 +62,7 @@ pub struct PixelFormat { impl_raw_accessors!((PixelFormat, *const ll::SDL_PixelFormat)); impl_raw_constructor!((PixelFormat, PixelFormat (raw: *const ll::SDL_PixelFormat))); -#[derive(Copy, Clone, PartialEq, Show, FromPrimitive)] +#[derive(Copy, Clone, PartialEq, Debug, FromPrimitive)] pub enum PixelFormatEnum { Unknown = ll::SDL_PIXELFORMAT_UNKNOWN as isize, Index1LSB = ll::SDL_PIXELFORMAT_INDEX1LSB as isize, diff --git a/src/sdl2/scancode.rs b/src/sdl2/scancode.rs index 76b5c63a..42226d18 100644 --- a/src/sdl2/scancode.rs +++ b/src/sdl2/scancode.rs @@ -3,7 +3,7 @@ use std::num::ToPrimitive; use sys::scancode as ll; -#[derive(PartialEq, Eq, FromPrimitive, Show, Copy)] +#[derive(PartialEq, Eq, FromPrimitive, Debug, Copy)] pub enum ScanCode { Unknown = ll::SDL_SCANCODE_UNKNOWN as isize, A = ll::SDL_SCANCODE_A as isize, diff --git a/tests/lib.rs b/tests/lib.rs index 6430dd64..c7c6c98b 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,3 +1,5 @@ +#![feature(path)] + extern crate sdl2; #[test]