The interner uses `RefCell` internally which opted out from Share.
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() {
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()),