about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-17 13:11:06 +0000
committerbors <bors@rust-lang.org>2014-08-17 13:11:06 +0000
commiteff87bc9d296c448645dc020c84ca8d1d324042a (patch)
treef808244cd53806bb19fe49fb316ea9c97acd85bb /src
parenta12a4ddcfabb80d6224960f19d6043f88f47d1e6 (diff)
parent7b141ad99b620e6b2e7879875f0672f1c634752c (diff)
downloadrust-eff87bc9d296c448645dc020c84ca8d1d324042a.tar.gz
rust-eff87bc9d296c448645dc020c84ca8d1d324042a.zip
auto merge of #16543 : huonw/rust/deprecated-btree, r=alexcrichton
This is very half-baked at the moment and very inefficient, e.g.
inappropriate use of by-value `self` (and thus being forced into an
overuse of `clone`). People get the wrong impression about Rust when
using it, e.g. that Rust cannot express what other languages can because
the implementation is inefficient: https://news.ycombinator.com/item?id=8187831 .
Diffstat (limited to 'src')
-rw-r--r--src/libcollections/btree.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libcollections/btree.rs b/src/libcollections/btree.rs
index 166d2c6c790..ca4b4ee6e83 100644
--- a/src/libcollections/btree.rs
+++ b/src/libcollections/btree.rs
@@ -11,6 +11,13 @@
 // btree.rs
 //
 
+// NB. this is not deprecated for removal, just deprecating the
+// current implementation. If the major pain-points are addressed
+// (overuse of by-value self and .clone), this can be removed.
+#![deprecated = "the current implementation is extremely inefficient, \
+                 prefer a HashMap, TreeMap or TrieMap"]
+#![allow(deprecated)]
+
 //! Starting implementation of a btree for rust.
 //! Structure inspired by github user davidhalperin's gist.