diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 165a827..37b10dd 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -10,7 +10,7 @@ use cocoa::appkit::{NSApp, NSRect, NSPoint, NSSize, fn main() { unsafe { - let pool = NSAutoreleasePool::new(nil); + let _pool = NSAutoreleasePool::new(nil); let app = NSApp(); app.setActivationPolicy_(NSApplicationActivationPolicyRegular); diff --git a/src/appkit.rs b/src/appkit.rs index 488e78d..9779604 100644 --- a/src/appkit.rs +++ b/src/appkit.rs @@ -9,7 +9,7 @@ #![allow(non_upper_case_globals)] -use base::{ObjCMethodCall, id, SEL, nil, NSInteger, NSUInteger}; +use base::{ObjCMethodCall, id, SEL, NSInteger, NSUInteger}; use libc; #[cfg(target_word_size = "32")] diff --git a/src/base.rs b/src/base.rs index 47eef81..13e09da 100644 --- a/src/base.rs +++ b/src/base.rs @@ -32,7 +32,8 @@ pub type NSInteger = libc::c_long; #[cfg(target_word_size = "64")] pub type NSUInteger = libc::c_ulong; -pub static nil: id = 0 as id; +#[allow(non_upper_case_globals)] +pub const nil: id = 0; extern { pub fn class_addMethod(cls: Class, name: SEL, imp: IMP, types: *const libc::c_char) -> bool;