]> git.lizzy.rs Git - rust.git/commitdiff
Relax interner's Share bound
authorFlavio Percoco <flaper87@gmail.com>
Wed, 19 Mar 2014 14:14:08 +0000 (15:14 +0100)
committerFlavio Percoco <flaper87@gmail.com>
Thu, 20 Mar 2014 09:16:55 +0000 (10:16 +0100)
The interner uses `RefCell` internally which opted out from Share.

src/libsyntax/ast.rs
src/libsyntax/util/interner.rs

index 0f982741fc16188b3978296ce41d6564f1f4a043..e79bc5dfdf7998631c32310d337e7de967d175a3 100644 (file)
@@ -1159,14 +1159,6 @@ mod test {
 
     use std::vec_ng::Vec;
 
-    fn is_share<T: Share>() {}
-
-    // Assert that the AST remains sharable.
-    #[test]
-    fn ast_is_share() {
-        is_share::<Item>();
-    }
-
     // are ASTs encodable?
     #[test]
     fn check_asts_encodable() {
index e290932a3033218582aaafcd9a870c9a57f00827..362d08a574895a3f3bd0e0df0760e407888d6796 100644 (file)
 use std::rc::Rc;
 use std::vec_ng::Vec;
 
-#[cfg(stage0)]
-use std::kinds::Share;
-
 pub struct Interner<T> {
     priv map: RefCell<HashMap<T, Name>>,
     priv vect: RefCell<Vec<T> >,
 }
 
 // when traits can extend traits, we should extend index<Name,T> to get []
-impl<T: Eq + Hash + Share + Clone + 'static> Interner<T> {
+impl<T: Eq + Hash + Clone + 'static> Interner<T> {
     pub fn new() -> Interner<T> {
         Interner {
             map: RefCell::new(HashMap::new()),