about summary refs log tree commit diff
path: root/src/libcollections/tree
AgeCommit message (Collapse)AuthorLines
2014-12-18remove TreeMap, TreeSet, TrieMap, TrieSet, LruCache. deprecate EnumSet's std ↵Alexis Beingessner-3214/+0
re-export
2014-12-18librustc: Always parse `macro!()`/`macro![]` as expressions if notPatrick Walton-6/+6
followed by a semicolon. This allows code like `vec![1i, 2, 3].len();` to work. This breaks code that uses macros as statements without putting semicolons after them, such as: fn main() { ... assert!(a == b) assert!(c == d) println(...); } It also breaks code that uses macros as items without semicolons: local_data_key!(foo) fn main() { println("hello world") } Add semicolons to fix this code. Those two examples can be fixed as follows: fn main() { ... assert!(a == b); assert!(c == d); println(...); } local_data_key!(foo); fn main() { println("hello world") } RFC #378. Closes #18635. [breaking-change]
2014-12-15std: Second pass stabilization of `default`Alex Crichton-0/+4
This commit performs a second pass stabilization of the `std::default` module. The module was already marked `#[stable]`, and the inheritance of `#[stable]` was removed since this attribute was applied. This commit adds the `#[stable]` attribute to the trait definition and one method name, along with all implementations found in the standard distribution.
2014-12-15auto merge of #19448 : japaric/rust/binops-by-value, r=nikomatsakisbors-4/+100
- The following operator traits now take their arguments by value: `Add`, `Sub`, `Mul`, `Div`, `Rem`, `BitAnd`, `BitOr`, `BitXor`, `Shl`, `Shr`. This breaks all existing implementations of these traits. - The binary operation `a OP b` now "desugars" to `OpTrait::op_method(a, b)` and consumes both arguments. - `String` and `Vec` addition have been changed to reuse the LHS owned value, and to avoid internal cloning. Only the following asymmetric operations are available: `String + &str` and `Vec<T> + &[T]`, which are now a short-hand for the "append" operation. [breaking-change] --- This passes `make check` locally. I haven't touch the unary operators in this PR, but converting them to by value should be very similar to this PR. I can work on them after this gets the thumbs up. @nikomatsakis r? the compiler changes @aturon r? the library changes. I think the only controversial bit is the semantic change of the `Vec`/`String` `Add` implementation. cc #19148
2014-12-15rollup merge of #19710: steveklabnik/gh15449Brian Anderson-2/+2
Fixes #15499.
2014-12-13libcollections: convert `TreeSet` binops to by valueJorge Aparicio-4/+100
2014-12-13libcollections: use unboxed closures in `TreeMap` methodsJorge Aparicio-6/+16
2014-12-13libcollections: fix unit testsJorge Aparicio-9/+18
2014-12-13libcollections: fix falloutJorge Aparicio-6/+12
2014-12-13auto merge of #19671 : tbu-/rust/pr_doc_removetraitrefs, r=Gankrobors-4/+3
This specifically means: - `Deque` - `Map` - `Set`
2014-12-10Fix inappropriate ## headingsSteve Klabnik-2/+2
Fixes #15499.
2014-12-10Remove references to traits that no longer existTobias Bucher-4/+3
This specifically means: - `Deque` - `Map` - `Set`
2014-12-08Change 'Example' to 'Examples' throughout collections' rustdocs.jbranchaud-47/+47
2014-12-08auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichtonbors-4/+4
Now that we have an overloaded comparison (`==`) operator, and that `Vec`/`String` deref to `[T]`/`str` on method calls, many `as_slice()`/`as_mut_slice()`/`to_string()` calls have become redundant. This patch removes them. These were the most common patterns: - `assert_eq(test_output.as_slice(), "ground truth")` -> `assert_eq(test_output, "ground truth")` - `assert_eq(test_output, "ground truth".to_string())` -> `assert_eq(test_output, "ground truth")` - `vec.as_mut_slice().sort()` -> `vec.sort()` - `vec.as_slice().slice(from, to)` -> `vec.slice(from_to)` --- Note that e.g. `a_string.push_str(b_string.as_slice())` has been left untouched in this PR, since we first need to settle down whether we want to favor the `&*b_string` or the `b_string[]` notation. This is rebased on top of #19167 cc @alexcrichton @aturon
2014-12-06libcollections: remove unnecessary `to_string()` callsJorge Aparicio-4/+4
2014-12-05Implement BitOps for TreeSetChase Southwood-1/+125
2014-11-17Fallout from deprecationAaron Turon-1/+1
This commit handles the fallout from deprecating `_with` and `_equiv` methods.
2014-11-17libcollections: use BorrowFrom in TreeSet, MapAaron Turon-17/+56
This commit generalizes methods like `get` and `remove` for `TreeMap` and `TreeSet` to use the new `std::borrow` infrastructure. [breaking-change]
2014-11-17Fix fallout from coercion removalNick Cameron-29/+29
2014-11-13Remove BTreeSet from all examples.Joseph Crail-4/+4
2014-11-08Renamed Extendable to Extendgamazeps-2/+2
In order to upgrade, simply rename the Extendable trait to Extend in your code Part of #18424 [breaking-change]
2014-11-06Implement low-hanging fruit of collection conventionsAlexis Beingessner-158/+181
* Renames/deprecates the simplest and most obvious methods * Adds FIXME(conventions)s for outstanding work * Marks "handled" methods as unstable NOTE: the semantics of reserve and reserve_exact have changed! Other methods have had their semantics changed as well, but in a way that should obviously not typecheck if used incorrectly. Lots of work and breakage to come, but this handles most of the core APIs and most eggregious breakage. Future changes should *mostly* focus on niche collections, APIs, or simply back-compat additions. [breaking-change]
2014-11-05Fix testsJorge Aparicio-7/+7
2014-11-02refactor libcollections as part of collection reformAlexis Beingessner-0/+2904
* Moves multi-collection files into their own directory, and splits them into seperate files * Changes exports so that each collection has its own module * Adds underscores to public modules and filenames to match standard naming conventions (that is, treemap::{TreeMap, TreeSet} => tree_map::TreeMap, tree_set::TreeSet) * Renames PriorityQueue to BinaryHeap * Renames SmallIntMap to VecMap * Miscellanious fallout fixes [breaking-change]