diff options
| author | Flavio Percoco <flaper87@gmail.com> | 2014-03-07 18:57:35 +0100 |
|---|---|---|
| committer | Flavio Percoco <flaper87@gmail.com> | 2014-03-20 10:16:55 +0100 |
| commit | 12ecafb31da2d0fe4654587375b464ea4d1151b1 (patch) | |
| tree | 5e8de06feb4495f1e25a9ac090d75bdfeb2b9edb /src/libsyntax | |
| parent | 21d23ff25b3709bbd72b62613ba6db00d65bf1a4 (diff) | |
| download | rust-12ecafb31da2d0fe4654587375b464ea4d1151b1.tar.gz rust-12ecafb31da2d0fe4654587375b464ea4d1151b1.zip | |
Replace Freeze bounds with Share bounds
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/util/interner.rs | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 77b0d4b5c9d..0f982741fc1 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1159,12 +1159,12 @@ mod test { use std::vec_ng::Vec; - fn is_freeze<T: Freeze>() {} + fn is_share<T: Share>() {} - // Assert that the AST remains Freeze (#10693). + // Assert that the AST remains sharable. #[test] - fn ast_is_freeze() { - is_freeze::<Item>(); + fn ast_is_share() { + is_share::<Item>(); } // are ASTs encodable? diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index c1ed96fe4de..e290932a303 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -23,13 +23,16 @@ 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 + Freeze + Clone + 'static> Interner<T> { +impl<T: Eq + Hash + Share + Clone + 'static> Interner<T> { pub fn new() -> Interner<T> { Interner { map: RefCell::new(HashMap::new()), |
