about summary refs log tree commit diff
path: root/src/libcollections/linked_list.rs
AgeCommit message (Collapse)AuthorLines
2017-06-13Merge crate `collections` into `alloc`Murarth-1504/+0
2017-05-04fallout from NonZero/Unique/Shared changesAlexis Beingessner-29/+43
2017-04-22Fix invalid linkageGuillaume Gomez-1/+1
2017-04-19Fix debug infinite loopGuillaume Gomez-5/+6
2017-04-13Various fixes throughout std::collections' docslukaramu-2/+2
* Added links where possible (limited because of facading) * Changed references to methods from `foo()` to `foo` in module docs * Changed references to methods from `HashMap::foo` to just `foo` in top-level docs for `HashMap` and the `default` doc for `DefaultHasher` * Various small other fixes
2017-04-13Update std::collections' docs to use iterator (etc.) boilerplatelukaramu-3/+21
This greatly improves consistency.
2017-04-04Fix linkssteveklabnik-2/+2
part of https://github.com/rust-lang/rust/issues/40912 []\n() is not actually a link.
2017-03-27Fix various useless derefs and slicingsOliver Schneider-1/+1
2017-03-17Stabilize rc_raw feature, closes #37197Aaron Turon-17/+17
2017-02-05Replace PlaceBack Debug implementation with deriveGuillaume Gomez-10/+14
2017-01-20Remove Debug implementations specializationGuillaume Gomez-35/+0
2017-01-20Add Debug implementations for libcollection structsGuillaume Gomez-0/+80
2016-12-28Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`Andrew Paseltiner-2/+1
CC #34761
2016-12-24Rollup merge of #38297 - matklad:linked-lists-are-not-cool, r=GuillaumeGomezSteve Klabnik-3/+17
Advertise Vec in LinkedList docs r? @steveklabnik Hi! We already [advise](https://doc.rust-lang.org/std/collections/#use-a-linkedlist-when) to use `Vec` instead of `LinkedList` in the top-level collections documentation. But I think it may be missed by someone who just directly finds `LinkedList`. What do you feel about advertising `Vec` directly in `LinkedList` docs as well?
2016-12-20run rustfmt on libcollections folderSrinivas Reddy Thatiparthy-18/+32
2016-12-16Advertise Vec in LinkedList docsAleksey Kladov-3/+17
2016-09-30Ignore lots and lots of std tests on emscriptenBrian Anderson-0/+1
2016-09-11Documentation of what does for each typeathulappadan-0/+1
2016-08-24Remove needless imports in `libcollections`.Jeffrey Seyfried-4/+0
2016-08-23Auto merge of #35656 - Stebalien:fused, r=alexcrichtonbors-1/+10
Implement 1581 (FusedIterator) * [ ] Implement on patterns. See https://github.com/rust-lang/rust/issues/27721#issuecomment-239638642. * [ ] Handle OS Iterators. A bunch of iterators (`Args`, `Env`, etc.) in libstd wrap platform specific iterators. The current ones all appear to be well-behaved but can we assume that future ones will be? * [ ] Does someone want to audit this? On first glance, all of the iterators on which I implemented `FusedIterator` appear to be well-behaved but there are a *lot* of them so a second pair of eyes would be nice. * I haven't touched rustc internal iterators (or the internal rand) because rustc doesn't actually call `fuse()`. * `FusedIterator` can't be implemented on `std::io::{Bytes, Chars}`. Closes: #35602 (Tracking Issue) Implements: rust-lang/rfcs#1581
2016-08-19std: Stabilize APIs for the 1.12 releaseAlex Crichton-4/+1
Stabilized * `Cell::as_ptr` * `RefCell::as_ptr` * `IpAddr::is_{unspecified,loopback,multicast}` * `Ipv6Addr::octets` * `LinkedList::contains` * `VecDeque::contains` * `ExitStatusExt::from_raw` - both on Unix and Windows * `Receiver::recv_timeout` * `RecvTimeoutError` * `BinaryHeap::peek_mut` * `PeekMut` * `iter::Product` * `iter::Sum` * `OccupiedEntry::remove_entry` * `VacantEntry::into_key` Deprecated * `Cell::as_unsafe_cell` * `RefCell::as_unsafe_cell` * `OccupiedEntry::remove_pair` Closes #27708 cc #27709 Closes #32313 Closes #32630 Closes #32713 Closes #34029 Closes #34392 Closes #34285 Closes #34529
2016-08-18Add a FusedIterator trait.Steven Allen-1/+10
This trait can be used to avoid the overhead of a fuse wrapper when an iterator is already well-behaved. Conforming to: RFC 1581 Closes: #35602
2016-07-28Rewrite `collections::LinkedList::append` doc example.Corey Farwell-11/+14
2016-07-17Add examples for LinkedListGuillaume Gomez-9/+65
2016-07-01Replace `LinkedList`'s use of `Box` with `Shared`Andrew Paseltiner-352/+283
Closes #34417
2016-04-20Auto merge of #32951 - LukasKalbertodt:collection_contains_rfc1552, r=brsonbors-0/+10
Add `contains` to `VecDeque` and `LinkedList` (+ tests) This implements [RFC 1552](https://github.com/rust-lang/rfcs/blob/master/text/1552-contains-method-for-various-collections.md). Tracking issue: #32630 Sorry for the late response. This is my first contribution, so please tell me if anything isn't optimal!
2016-04-14Add `contains` to `VecDeque` and `LinkedList` (+ tests)Lukas Kalbertodt-0/+10
2016-04-14Specialize `Extend` to `append` for `{LinkedList, Vec}`Andrew Paseltiner-0/+14
2016-03-28Rollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnikSteve Klabnik-8/+8
first round of removal of integer suffixes
2016-03-12std: Clean out deprecated APIsAlex Crichton-1/+1
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-03-11removed integer suffixes in libcollections and libcollectionstestsrinivasreddy-8/+8
2016-02-16Implement placement-in protocol for `LinkedList`Andrew Paseltiner-2/+148
CC #30172.
2016-02-02Correct `linked_list::IntoIter` doc commentAndrew Paseltiner-1/+1
2015-12-31Make `LinkedList` and its read-only iterators covariantAndrew Paseltiner-6/+14
CC #30642
2015-11-24rustfmt libcollectionsNick Cameron-54/+75
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+2
2015-11-06Remove stability annotations from trait impl itemsVadim Petrochenkov-1/+0
Remove `stable` stability annotations from inherent impls
2015-10-06Add RFC 1238's `unsafe_destructor_blind_to_params` (UGEH) where needed.Felix S. Klock II-0/+1
I needed it in `RawVec`, `Vec`, and `TypedArena` for `rustc` to bootstrap; but of course that alone was not sufficient for `make check`. Later I added `unsafe_destructor_blind_to_params` to collections, in particular `LinkedList` and `RawTable` (the backing representation for `HashMap` and `HashSet`), to get the regression tests exercising cyclic structure from PR #27185 building. ---- Note that the feature is `dropck_parametricity` (which is not the same as the attribute's name). We will almost certainly vary our strategy here in the future, so it makes some sense to have a not-as-ugly name for the feature gate. (The attribute name was deliberately selected to be ugly looking.)
2015-08-26Make iter::order functions into methods on IteratorSteven Fackler-5/+5
This does cause some breakage due to deficiencies in resolve - `path::Components` is both an `Iterator` and implements `Eq`, `Ord`, etc. If one calls e.g. `partial_cmp` on a `Components` and passes a `&Components` intending to target the `PartialOrd` impl, the compiler will select the `partial_cmp` from `Iterator` and then error out. I doubt anyone will run into breakage from `Components` specifically, but we should see if there are third party types that will run into issues. `iter::order::equals` wasn't moved to `Iterator` since it's exactly the same as `iter::order::eq` but with an `Eq` instead of `PartialEq` bound, which doensn't seem very useful. I also updated `le`, `gt`, etc to use `partial_cmp` which lets us drop the extra `PartialEq` bound. cc #27737
2015-08-15collections: Add issues for unstable featuresAlex Crichton-2/+4
2015-08-11Register new snapshotsAlex Crichton-3/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-03syntax: Implement #![no_core]Alex Crichton-1/+2
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-07-27Show appropriate feature flags in docsSteve Klabnik-2/+4
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-2/+2
2015-06-17collections: Split the `collections` featureAlex Crichton-2/+2
This commit also deprecates the `as_string` and `as_slice` free functions in the `string` and `vec` modules.
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-2/+2
2015-06-08Auto merge of #25989 - jooert:implement_rfc839, r=Gankrobors-0/+7
I had to use `impl<'a, V: Copy> Extend<(usize, &'a V)> for VecMap<V>` instead of `impl<'a, V: Copy> Extend<(&'a usize, &'a V)> for VecMap<V>` as that's what is needed for doing ```rust let mut a = VecMap::new(); let b = VecMap::new(); b.insert(1, "foo"); a.extend(&b) ``` I can squash the commits after review. r? @Gankro
2015-06-08Implement RFC 839Johannes Oertel-0/+7
Closes #25976.
2015-06-06linked_list: Add Rawlink::fromUlrik Sverdrup-12/+14
2015-06-06linked_list: Add method Node::set_nextUlrik Sverdrup-11/+20