Relax interner's Share bound

The interner uses `RefCell` internally which opted out from Share.
This commit is contained in:
Flavio Percoco 2014-03-19 15:14:08 +01:00
parent 12ecafb31d
commit b85d5f1f9a
2 changed files with 1 additions and 12 deletions

View 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() {

View File

@ -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<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()),