Relax interner's Share bound
The interner uses `RefCell` internally which opted out from Share.
This commit is contained in:
parent
12ecafb31d
commit
b85d5f1f9a
@ -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() {
|
||||
|
@ -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()),
|
||||
|
Loading…
Reference in New Issue
Block a user