From b1d855fc83048d99f72e48192ed63eb82fbca6cd Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 10 Apr 2014 22:22:38 +0200 Subject: [PATCH 1/2] Update to current rust: use the new attributes syntax. --- lib.rs | 10 +++++----- xlib.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib.rs b/lib.rs index 50a956a..82faa58 100644 --- a/lib.rs +++ b/lib.rs @@ -7,12 +7,12 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[crate_id = "github.com/mozilla-servo/rust-xlib#xlib:0.1"]; -#[crate_type = "lib"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; +#![crate_id = "github.com/mozilla-servo/rust-xlib#xlib:0.1"] +#![crate_type = "lib"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] -#[feature(globs)]; +#![feature(globs)] extern crate std; diff --git a/xlib.rs b/xlib.rs index 522f835..bb8e2d7 100644 --- a/xlib.rs +++ b/xlib.rs @@ -7,8 +7,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#[allow(non_uppercase_statics)]; -#[allow(non_camel_case_types)]; +#![allow(non_uppercase_statics)] +#![allow(non_camel_case_types)] use std::libc::*; From de18d16693b1650bd0aa787c52fa9b97e4e42ab1 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Thu, 10 Apr 2014 22:22:46 +0200 Subject: [PATCH 2/2] Update to current rust: libc is in its own crate. --- lib.rs | 1 + xlib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib.rs b/lib.rs index 82faa58..1f48db5 100644 --- a/lib.rs +++ b/lib.rs @@ -14,6 +14,7 @@ #![feature(globs)] +extern crate libc; extern crate std; pub mod xlib; diff --git a/xlib.rs b/xlib.rs index bb8e2d7..d2d8844 100644 --- a/xlib.rs +++ b/xlib.rs @@ -10,7 +10,7 @@ #![allow(non_uppercase_statics)] #![allow(non_camel_case_types)] -use std::libc::*; +use libc::*; pub type XID = c_ulong;