From b85d5f1f9a873e706bd17be843cd54f55dcff211 Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Wed, 19 Mar 2014 15:14:08 +0100 Subject: Relax interner's Share bound The interner uses `RefCell` internally which opted out from Share. --- src/libsyntax/ast.rs | 8 -------- src/libsyntax/util/interner.rs | 5 +---- 2 files changed, 1 insertion(+), 12 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 0f982741fc1..e79bc5dfdf7 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1159,14 +1159,6 @@ mod test { use std::vec_ng::Vec; - fn is_share() {} - - // Assert that the AST remains sharable. - #[test] - fn ast_is_share() { - is_share::(); - } - // are ASTs encodable? #[test] fn check_asts_encodable() { diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index e290932a303..362d08a5748 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -23,16 +23,13 @@ use std::hash::Hash; use std::rc::Rc; use std::vec_ng::Vec; -#[cfg(stage0)] -use std::kinds::Share; - pub struct Interner { priv map: RefCell>, priv vect: RefCell >, } // when traits can extend traits, we should extend index to get [] -impl Interner { +impl Interner { pub fn new() -> Interner { Interner { map: RefCell::new(HashMap::new()), -- cgit 1.4.1-3-g733a5