Skip to content

Commit 01c0903

Browse files
committed
---
yaml --- r: 64784 b: refs/heads/snap-stage3 c: 34a27db h: refs/heads/master v: v3
1 parent f0d577c commit 01c0903

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1245
-2240
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: b027c5fce3e74dfa5583224967e38ef40518ecfb
4+
refs/heads/snap-stage3: 34a27db8bf90d9cc3727a1c6654eccdc7018eb29
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,7 @@ mod m1 {
14941494
This example shows how one can use `allow` and `warn` to toggle
14951495
a particular check on and off.
14961496

1497-
~~~{.xfail-test}
1497+
~~~
14981498
#[warn(missing_doc)]
14991499
mod m2{
15001500
#[allow(missing_doc)]

branches/snap-stage3/doc/tutorial.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,6 @@ let mut x = 5;
11541154
let y = &x; // x is now frozen, it cannot be modified
11551155
}
11561156
// x is now unfrozen again
1157-
# x = 3;
11581157
~~~~
11591158
11601159
Mutable managed boxes handle freezing dynamically when any of their contents

branches/snap-stage3/mk/target.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)): \
8484
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): CFG_COMPILER_TRIPLE = $(2)
8585
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
8686
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
87-
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
8887
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)) \
8988
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)) \
9089
| $$(TLIB$(1)_T_$(2)_H_$(3))/
@@ -95,7 +94,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
9594

9695
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X_$(3)): \
9796
$$(DRIVER_CRATE) \
98-
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
9997
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)) \
10098
| $$(TBIN$(1)_T_$(2)_H_$(3))/
10199
@$$(call E, compile_and_link: $$@)

branches/snap-stage3/mk/tests.mk

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,58 +319,50 @@ endif
319319

320320
$(3)/stage$(1)/test/stdtest-$(2)$$(X_$(2)): \
321321
$$(STDLIB_CRATE) $$(STDLIB_INPUTS) \
322-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
323322
$$(STDTESTDEP_$(1)_$(2)_$(3))
324323
@$$(call E, compile_and_link: $$@)
325324
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
326325

327326
$(3)/stage$(1)/test/extratest-$(2)$$(X_$(2)): \
328327
$$(EXTRALIB_CRATE) $$(EXTRALIB_INPUTS) \
329-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
330328
$$(STDTESTDEP_$(1)_$(2)_$(3))
331329
@$$(call E, compile_and_link: $$@)
332330
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
333331

334332
$(3)/stage$(1)/test/syntaxtest-$(2)$$(X_$(2)): \
335333
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \
336-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
337334
$$(STDTESTDEP_$(1)_$(2)_$(3))
338335
@$$(call E, compile_and_link: $$@)
339336
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
340337

341338
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): CFG_COMPILER_TRIPLE = $(2)
342339
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): \
343340
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
344-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
345341
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM_$(2)) \
346342
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2))
347343
@$$(call E, compile_and_link: $$@)
348344
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
349345

350346
$(3)/stage$(1)/test/rustpkgtest-$(2)$$(X_$(2)): \
351347
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
352-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
353348
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
354349
@$$(call E, compile_and_link: $$@)
355350
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
356351

357352
$(3)/stage$(1)/test/rustitest-$(2)$$(X_$(2)): \
358353
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
359-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
360354
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
361355
@$$(call E, compile_and_link: $$@)
362356
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
363357

364358
$(3)/stage$(1)/test/rusttest-$(2)$$(X_$(2)): \
365359
$$(RUST_LIB) $$(RUST_INPUTS) \
366-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
367360
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
368361
@$$(call E, compile_and_link: $$@)
369362
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
370363

371364
$(3)/stage$(1)/test/rustdoctest-$(2)$$(X_$(2)): \
372365
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
373-
$$(SREQ$(1)_T_$(2)_H_$(3)) \
374366
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
375367
@$$(call E, compile_and_link: $$@)
376368
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test

branches/snap-stage3/mk/tools.mk

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,18 @@ define TOOLS_STAGE_N_TARGET
3737

3838
$$(TBIN$(1)_T_$(4)_H_$(3))/compiletest$$(X_$(4)): \
3939
$$(COMPILETEST_CRATE) $$(COMPILETEST_INPUTS) \
40-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
40+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
41+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
42+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
4143
| $$(TBIN$(1)_T_$(4)_H_$(3))/
4244
@$$(call E, compile_and_link: $$@)
4345
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$<
4446

4547
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)): \
4648
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \
47-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
49+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
50+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
51+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
4852
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
4953
| $$(TLIB$(1)_T_$(4)_H_$(3))/
5054
@$$(call E, compile_and_link: $$@)
@@ -54,15 +58,16 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)): \
5458

5559
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X_$(4)): \
5660
$$(DRIVER_CRATE) \
57-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
58-
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \
61+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \
5962
| $$(TBIN$(1)_T_$(4)_H_$(3))/
6063
@$$(call E, compile_and_link: $$@)
6164
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustpkg -o $$@ $$<
6265

6366
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)): \
6467
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
65-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
68+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
69+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
70+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
6671
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
6772
| $$(TLIB$(1)_T_$(4)_H_$(3))/
6873
@$$(call E, compile_and_link: $$@)
@@ -72,15 +77,16 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)): \
7277

7378
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X_$(4)): \
7479
$$(DRIVER_CRATE) \
75-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
7680
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)) \
7781
| $$(TBIN$(1)_T_$(4)_H_$(3))/
7882
@$$(call E, compile_and_link: $$@)
7983
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rustdoc -o $$@ $$<
8084

8185
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)): \
8286
$$(RUSTI_LIB) $$(RUSTI_INPUTS) \
83-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
87+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
88+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
89+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
8490
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4)) \
8591
| $$(TLIB$(1)_T_$(4)_H_$(3))/
8692
@$$(call E, compile_and_link: $$@)
@@ -90,15 +96,16 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)): \
9096

9197
$$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X_$(4)): \
9298
$$(DRIVER_CRATE) \
93-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
9499
$$(TLIB$(1)_T_$(4)_H_$(4))/$(CFG_LIBRUSTI_$(4)) \
95100
| $$(TBIN$(1)_T_$(4)_H_$(3))/
96101
@$$(call E, compile_and_link: $$@)
97102
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rusti -o $$@ $$<
98103

99104
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \
100105
$$(RUST_LIB) $$(RUST_INPUTS) \
101-
$$(SREQ$(1)_T_$(4)_H_$(3)) \
106+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
107+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
108+
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
102109
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)) \
103110
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTI_$(4)) \
104111
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTDOC_$(4)) \
@@ -111,7 +118,6 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)): \
111118

112119
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X_$(4)): \
113120
$$(DRIVER_CRATE) \
114-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
115121
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUST_$(4)) \
116122
| $$(TBIN$(1)_T_$(4)_H_$(3))/
117123
@$$(call E, compile_and_link: $$@)

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ fn make_out_name(config: &config, testfile: &Path, extension: &str) -> Path {
681681
}
682682

683683
fn aux_output_dir_name(config: &config, testfile: &Path) -> Path {
684-
Path(output_base_name(config, testfile).to_str() + ".libaux")
684+
output_base_name(config, testfile).with_filetype("libaux")
685685
}
686686

687687
fn output_testname(testfile: &Path) -> Path {

branches/snap-stage3/src/etc/extract-tests.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,14 @@
5959
block = "fn main() {\n" + block + "\n}\n"
6060
if not re.search(r"\bextern mod extra\b", block):
6161
block = "extern mod extra;\n" + block
62-
block = """#[ deny(warnings) ];
63-
#[ allow(unused_variable) ];\n
64-
#[ allow(dead_assignment) ];\n
65-
#[ allow(unused_mut) ];\n
62+
block = """#[ forbid(ctypes) ];
63+
#[ forbid(path_statement) ];
64+
#[ forbid(type_limits) ];
65+
#[ forbid(unrecognized_lint) ];
66+
#[ forbid(unused_imports) ];
67+
#[ forbid(while_true) ];
68+
69+
#[ warn(non_camel_case_types) ];\n
6670
""" + block
6771
if xfail:
6872
block = "// xfail-test\n" + block

branches/snap-stage3/src/libextra/bitv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,8 @@ impl cmp::Eq for BitvSet {
703703
}
704704

705705
impl Container for BitvSet {
706-
#[inline]
707706
fn len(&self) -> uint { self.size }
707+
fn is_empty(&self) -> bool { self.size == 0 }
708708
}
709709

710710
impl Mutable for BitvSet {

branches/snap-stage3/src/libextra/dlist.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl<T> DList<T> {
356356

357357
/// Provide a reverse iterator
358358
#[inline]
359-
pub fn rev_iter<'a>(&'a self) -> InvertIterator<DListIterator<'a, T>> {
359+
pub fn rev_iter<'a>(&'a self) -> InvertIterator<&'a T, DListIterator<'a, T>> {
360360
self.iter().invert()
361361
}
362362

@@ -376,7 +376,8 @@ impl<T> DList<T> {
376376
}
377377
/// Provide a reverse iterator with mutable references
378378
#[inline]
379-
pub fn mut_rev_iter<'a>(&'a mut self) -> InvertIterator<MutDListIterator<'a, T>> {
379+
pub fn mut_rev_iter<'a>(&'a mut self) -> InvertIterator<&'a mut T,
380+
MutDListIterator<'a, T>> {
380381
self.mut_iter().invert()
381382
}
382383

@@ -389,7 +390,7 @@ impl<T> DList<T> {
389390

390391
/// Consume the list into an iterator yielding elements by value, in reverse
391392
#[inline]
392-
pub fn consume_rev_iter(self) -> InvertIterator<ConsumeIterator<T>> {
393+
pub fn consume_rev_iter(self) -> InvertIterator<T, ConsumeIterator<T>> {
393394
self.consume_iter().invert()
394395
}
395396
}

branches/snap-stage3/src/libextra/priority_queue.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ pub struct PriorityQueue<T> {
2727
impl<T:Ord> Container for PriorityQueue<T> {
2828
/// Returns the length of the queue
2929
fn len(&self) -> uint { self.data.len() }
30+
31+
/// Returns true if a queue contains no elements
32+
fn is_empty(&self) -> bool { self.len() == 0 }
3033
}
3134

3235
impl<T:Ord> Mutable for PriorityQueue<T> {

branches/snap-stage3/src/libextra/ringbuf.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ pub struct RingBuf<T> {
3434
impl<T> Container for RingBuf<T> {
3535
/// Return the number of elements in the RingBuf
3636
fn len(&self) -> uint { self.nelts }
37+
38+
/// Return true if the RingBufcontains no elements
39+
fn is_empty(&self) -> bool { self.len() == 0 }
3740
}
3841

3942
impl<T> Mutable for RingBuf<T> {
@@ -181,7 +184,7 @@ impl<T> RingBuf<T> {
181184
}
182185

183186
/// Back-to-front iterator.
184-
pub fn rev_iter<'a>(&'a self) -> InvertIterator<RingBufIterator<'a, T>> {
187+
pub fn rev_iter<'a>(&'a self) -> InvertIterator<&'a T, RingBufIterator<'a, T>> {
185188
self.iter().invert()
186189
}
187190

@@ -192,7 +195,7 @@ impl<T> RingBuf<T> {
192195
}
193196

194197
/// Back-to-front iterator which returns mutable values.
195-
pub fn mut_rev_iter<'a>(&'a mut self) -> InvertIterator<RingBufMutIterator<'a, T>> {
198+
pub fn mut_rev_iter<'a>(&'a mut self) -> InvertIterator<&'a mut T, RingBufMutIterator<'a, T>> {
196199
self.mut_iter().invert()
197200
}
198201
}

branches/snap-stage3/src/libextra/smallintmap.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ impl<V> Container for SmallIntMap<V> {
3737
}
3838
sz
3939
}
40+
41+
/// Return true if the map contains no elements
42+
fn is_empty(&self) -> bool { self.len() == 0 }
4043
}
4144

4245
impl<V> Mutable for SmallIntMap<V> {
@@ -204,7 +207,7 @@ impl<V> SmallIntMap<V> {
204207
/// Empties the hash map, moving all values into the specified closure
205208
pub fn consume(&mut self)
206209
-> FilterMapIterator<(uint, Option<V>), (uint, V),
207-
EnumerateIterator<VecConsumeIterator<Option<V>>>>
210+
EnumerateIterator<Option<V>, VecConsumeIterator<Option<V>>>>
208211
{
209212
let values = replace(&mut self.v, ~[]);
210213
values.consume_iter().enumerate().filter_map(|(i, v)| {
@@ -290,7 +293,8 @@ pub struct SmallIntMapIterator<'self, T> {
290293

291294
iterator!(impl SmallIntMapIterator -> (uint, &'self T), get_ref)
292295
double_ended_iterator!(impl SmallIntMapIterator -> (uint, &'self T), get_ref)
293-
pub type SmallIntMapRevIterator<'self, T> = InvertIterator<SmallIntMapIterator<'self, T>>;
296+
pub type SmallIntMapRevIterator<'self, T> = InvertIterator<(uint, &'self T),
297+
SmallIntMapIterator<'self, T>>;
294298

295299
pub struct SmallIntMapMutIterator<'self, T> {
296300
priv front: uint,
@@ -300,7 +304,8 @@ pub struct SmallIntMapMutIterator<'self, T> {
300304

301305
iterator!(impl SmallIntMapMutIterator -> (uint, &'self mut T), get_mut_ref)
302306
double_ended_iterator!(impl SmallIntMapMutIterator -> (uint, &'self mut T), get_mut_ref)
303-
pub type SmallIntMapMutRevIterator<'self, T> = InvertIterator<SmallIntMapMutIterator<'self, T>>;
307+
pub type SmallIntMapMutRevIterator<'self, T> = InvertIterator<(uint, &'self mut T),
308+
SmallIntMapMutIterator<'self, T>>;
304309

305310
#[cfg(test)]
306311
mod test_map {

branches/snap-stage3/src/libextra/treemap.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,19 @@ impl<K: TotalOrd, V> MutableMap<K, V> for TreeMap<K, V> {
135135
find_mut(&mut self.root, key)
136136
}
137137

138+
/// Insert a key-value pair into the map. An existing value for a
139+
/// key is replaced by the new value. Return true if the key did
140+
/// not already exist in the map.
141+
fn insert(&mut self, key: K, value: V) -> bool {
142+
self.swap(key, value).is_none()
143+
}
144+
145+
/// Remove a key-value pair from the map. Return true if the key
146+
/// was present in the map, otherwise false.
147+
fn remove(&mut self, key: &K) -> bool {
148+
self.pop(key).is_some()
149+
}
150+
138151
/// Insert a key-value pair from the map. If the key already had a value
139152
/// present in the map, that value is returned. Otherwise None is returned.
140153
fn swap(&mut self, key: K, value: V) -> Option<V> {

0 commit comments

Comments
 (0)