diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-09-10 16:34:31 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-09-10 16:50:07 -0700 |
| commit | 29003c799f41cce948bc043cdd1350ca4bee949e (patch) | |
| tree | 0e879812117977b10d42558588f952b792fa5f99 /src/libstd/map.rs | |
| parent | 20263595185590c8c2705b92bddbd00e3fc56713 (diff) | |
| download | rust-29003c799f41cce948bc043cdd1350ca4bee949e.tar.gz rust-29003c799f41cce948bc043cdd1350ca4bee949e.zip | |
Rename the poorly named Managed<T> type to Mut<T>.
The Mut<T> type is intended to allow freezable data stuctures to be stored in `@mut` boxes. Currently this causes borrowck to be very conserivative since it cannot prove that you are not modifying such a structure while iterating over it, for example. But if you do `@Mut<T>` instead of `@mut T`, you will effectively convert borrowck's static checks into dynamic ones. This lets you use the e.g. send_map just like a Java Map or something else.
Diffstat (limited to 'src/libstd/map.rs')
| -rw-r--r-- | src/libstd/map.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/map.rs b/src/libstd/map.rs index 5436ea1a803..cd19da61ab6 100644 --- a/src/libstd/map.rs +++ b/src/libstd/map.rs @@ -5,7 +5,7 @@ use io::WriterUtil; use to_str::ToStr; -use managed::Managed; +use mutable::Mut; use send_map::linear::LinearMap; use core::cmp::Eq; @@ -463,7 +463,7 @@ fn hash_from_uints<V: Copy>(items: &[(uint, V)]) -> hashmap<uint, V> { } // XXX Transitional -impl<K: Eq IterBytes Hash Copy, V: Copy> Managed<LinearMap<K, V>>: +impl<K: Eq IterBytes Hash Copy, V: Copy> @Mut<LinearMap<K, V>>: map<K, V> { pure fn size() -> uint { unchecked { |
