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/test | |
| 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/test')
| -rw-r--r-- | src/test/bench/core-map.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/bench/core-map.rs b/src/test/bench/core-map.rs index 4901a85369a..112c25d5146 100644 --- a/src/test/bench/core-map.rs +++ b/src/test/bench/core-map.rs @@ -6,7 +6,7 @@ use std; use std::map; -use managed::Managed; +use mutable::Mut; use send_map::linear::*; use io::WriterUtil; @@ -166,11 +166,11 @@ fn main(args: ~[~str]) { { let rng = rand::seeded_rng(copy seed); let mut results = empty_results(); - int_benchmarks::<Managed<LinearMap<uint, uint>>>( - || Managed(LinearMap()), + int_benchmarks::<@Mut<LinearMap<uint, uint>>>( + || @Mut(LinearMap()), rng, num_keys, &mut results); - str_benchmarks::<Managed<LinearMap<~str, uint>>>( - || Managed(LinearMap()), + str_benchmarks::<@Mut<LinearMap<~str, uint>>>( + || @Mut(LinearMap()), rng, num_keys, &mut results); write_results("libstd::map::hashmap", &results); } |
