diff --git a/global.rs b/global.rs index 4d97a99f5..adcbd70b5 100644 --- a/global.rs +++ b/global.rs @@ -2,13 +2,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -#[doc = " +#![doc = " Handy functions for creating class objects and so forth. -"]; +"] -use std::libc::{c_uint, c_void}; +use libc::{c_uint, c_void}; use std::str::raw::from_c_str; use std::cast::transmute; use std::ptr::null; diff --git a/glue.rs b/glue.rs index aa6709ada..aa48d9433 100644 --- a/glue.rs +++ b/glue.rs @@ -4,8 +4,8 @@ /* automatically generated by rust-bindgen */ -use std::libc; -use std::libc::*; +use libc; +use libc::*; use jsapi::*; use jsfriendapi::JSJitInfo; use jsval::JSVal; diff --git a/js.rc b/js.rc index 8394a7249..6524d24a0 100644 --- a/js.rc +++ b/js.rc @@ -2,33 +2,32 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -#[crate_id = "github.com/mozilla-servo/rust-mozjs#js:0.1"]; -#[crate_type = "lib"]; -#[crate_type = "dylib"]; -#[crate_type = "rlib"]; +#![crate_id = "github.com/mozilla-servo/rust-mozjs#js:0.1"] +#![crate_type = "lib"] +#![crate_type = "dylib"] +#![crate_type = "rlib"] -#[feature(globs, link_args, managed_boxes)]; +#![feature(globs, link_args, managed_boxes, phase)] -#[allow(non_uppercase_statics, non_camel_case_types)]; - -#[feature(phase)]; -#[phase(syntax, link)] extern crate log; +#![allow(non_uppercase_statics, non_camel_case_types)] +extern crate green; +extern crate libc; +#[phase(syntax, link)] +extern crate log; #[cfg(test)] extern crate rustuv; - -extern crate green; extern crate serialize; +use libc::c_uint; +use libc::types::common::c99::uint32_t; use std::cast; use std::ptr::null; use std::result::{Result, Ok, Err}; -use std::libc::c_uint; use jsapi::{JSBool, JSContext, JSObject, jsid, JSProto_LIMIT}; use jsapi::JS_ComputeThis; -use std::libc::types::common::c99::uint32_t; use jsval::JSVal; use rust::jsobj; diff --git a/jsapi.rs b/jsapi.rs index 491e46f28..48343969f 100644 --- a/jsapi.rs +++ b/jsapi.rs @@ -4,9 +4,9 @@ /* automatically generated by rust-bindgen */ -#[allow(non_uppercase_statics, non_camel_case_types)]; +#![allow(non_uppercase_statics, non_camel_case_types)] -use std::libc::*; +use libc::*; use jsfriendapi::JSJitInfo; use jsval::JSVal; diff --git a/jsfriendapi.rs b/jsfriendapi.rs index a16b0f91e..e051edcb4 100644 --- a/jsfriendapi.rs +++ b/jsfriendapi.rs @@ -17,7 +17,7 @@ pub struct JSJitInfo { #[nolink] pub mod bindgen { use jsapi::{JSContext, JSObject, JSClass, JSRuntime}; - use std::libc::uintptr_t; + use libc::uintptr_t; extern { pub fn JS_NewObjectWithUniqueType(cx: *JSContext, clasp: *JSClass, diff --git a/jsval.rs b/jsval.rs index a58a4190d..caf36b241 100644 --- a/jsval.rs +++ b/jsval.rs @@ -4,8 +4,8 @@ use jsapi::{JSObject, JSString}; +use libc::c_void; use std::cast; -use std::libc::c_void; static JSVAL_TAG_SHIFT: int = 47; diff --git a/rust.rs b/rust.rs index 70b8514e6..53c0ab740 100644 --- a/rust.rs +++ b/rust.rs @@ -2,10 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -#[doc = "Rust wrappers around the raw JS apis"]; +#![doc = "Rust wrappers around the raw JS apis"] -use std::libc::types::os::arch::c95::{size_t, c_uint}; -use std::libc::c_char; +use libc::types::os::arch::c95::{size_t, c_uint}; +use libc::c_char; use std::cmp; use std::rc; use std::rt::Runtime;