From bf93b93cee570ccb0bd40e3c7f6c4f7a77b94631 Mon Sep 17 00:00:00 2001 From: Michael Layzell Date: Sat, 6 Dec 2014 22:47:03 -0500 Subject: [PATCH] Switch to using std::sync instead of libsync libsync has been removed from rust, which means that for sync primitives, std::sync is required. This switches string-cache to using std::sync. Unfortunately, this means that string-cache now depends on both std and core. --- macros/src/atom/mod.rs | 1 - src/atom/mod.rs | 2 +- src/lib.rs | 13 ------------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/macros/src/atom/mod.rs b/macros/src/atom/mod.rs index 618daa6..a6cba35 100644 --- a/macros/src/atom/mod.rs +++ b/macros/src/atom/mod.rs @@ -15,7 +15,6 @@ use syntax::ext::base::{ExtCtxt, MacResult, MacExpr}; use syntax::parse::token::{get_ident, InternedString, Ident, Literal, Lit}; use std::iter::Chain; -use std::slice::{Items, Found, NotFound}; use std::collections::HashMap; use std::ascii::AsciiExt; diff --git a/src/atom/mod.rs b/src/atom/mod.rs index 3f43e17..81f1693 100644 --- a/src/atom/mod.rs +++ b/src/atom/mod.rs @@ -24,7 +24,7 @@ use alloc::heap; use alloc::boxed::Box; use collections::string::String; use collections::hash::{Hash, Hasher}; -use sync::Mutex; +use std::sync::Mutex; use self::repr::{UnpackedAtom, Static, Inline, Dynamic}; diff --git a/src/lib.rs b/src/lib.rs index b637e32..45008b4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -18,12 +18,10 @@ extern crate core; extern crate alloc; extern crate collections; -extern crate sync; #[cfg(test)] extern crate test; -#[cfg(test)] extern crate std; #[phase(plugin)] @@ -59,14 +57,3 @@ mod string_cache { pub use atom; pub use namespace; } - -// For macros and deriving. -#[cfg(not(test))] -mod std { - pub use core::{cmp, fmt, clone, option, mem, result}; - pub use collections::hash; - - pub mod sync { - pub use sync::one::{Once, ONCE_INIT}; - } -}