diff options
| author | bors <bors@rust-lang.org> | 2013-05-06 23:06:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-06 23:06:36 -0700 |
| commit | 3225870191f7e6b601d70fa5aa08617eb04b170b (patch) | |
| tree | aecc5d13953424c96949633669f8f9acfb043701 /src/test | |
| parent | bf748e50017ab7cdb0f703ec9438793226d43a22 (diff) | |
| parent | 393a409b5d418be30f4e959cce74daacad112f75 (diff) | |
auto merge of #6236 : alexcrichton/rust/more-map-methods, r=thestinger
Closes #5392 and #5393 I implemented the pop/swap methods for TrieMap/TreeMap/SmallIntMap, and I also updated all of them such that pop isn't just a remove/insert, but rather it's all done in one operation. One thing I did notice is that with default methods it'd be really nice to define `insert` and `remove` in terms of `pop` and `swap` (or vice versa, just to have them available).
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/class-impl-very-parameterized-trait.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/run-pass/class-impl-very-parameterized-trait.rs b/src/test/run-pass/class-impl-very-parameterized-trait.rs index cf887758bff..b89bf064092 100644 --- a/src/test/run-pass/class-impl-very-parameterized-trait.rs +++ b/src/test/run-pass/class-impl-very-parameterized-trait.rs @@ -103,6 +103,10 @@ impl<T> Map<int, T> for cat<T> { false } } + + fn pop(&mut self, _k: &int) -> Option<T> { fail!() } + + fn swap(&mut self, _k: int, _v: T) -> Option<T> { fail!() } } pub impl<T> cat<T> { |
