about summary refs log tree commit diff
path: root/src/librustc_data_structures/array_vec.rs
AgeCommit message (Collapse)AuthorLines
2018-09-18Remove `array_vec.rs`.Nicholas Nethercote-305/+0
`SparseBitSet` is the only remaining user of `ArrayVec`. This commit switches it to using `SmallVec`, and removes `array_vec.rs`. Why the switch? Although `SparseBitSet` is size-limited and doesn't need the ability to spill to the heap, `SmallVec` has many more features than `ArrayVec`. In particular, it's now possible to keep `SparseBitSet`'s elements in sorted order, which gives in-order iteration, which is a requirement for the next commit.
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-3/+3
2018-05-24stabilize RangeBounds collections_range #30877Cory Sherman-2/+2
rename RangeBounds::start() -> start_bound() rename RangeBounds::end() -> end_bound()
2018-04-16Auto merge of #48945 - clarcharr:iter_exhaust, r=Kimundibors-2/+2
Replace manual iterator exhaust with for_each(drop) This originally added a dedicated method, `Iterator::exhaust`, and has since been replaced with `for_each(drop)`, which is more idiomatic. <del>This is just shorthand for `for _ in &mut self {}` or `while let Some(_) = self.next() {}`. This states the intent a lot more clearly than the identical code: run the iterator to completion. <del>At least personally, my eyes tend to gloss over `for _ in &mut self {}` without fully paying attention to what it does; having a `Drop` implementation akin to: <del>`for _ in &mut self {}; unsafe { free(self.ptr); }`</del> <del>Is not as clear as: <del>`self.exhaust(); unsafe { free(self.ptr); }` <del>Additionally, I've seen debate over whether `while let Some(_) = self.next() {}` or `for _ in &mut self {}` is more clear, whereas `self.exhaust()` is clearer than both.
2018-04-04Replace manual iter exhaust with for_each(drop).Clar Charr-2/+2
2018-03-29Move RangeArguments to {core::std}::ops and rename to RangeBoundsSimon Sapin-2/+2
These unstable items are deprecated: * The `std::collections::range::RangeArgument` reexport * The `std::collections::range` module.
2018-03-29Move alloc::Bound to {core,std}::opsSimon Sapin-1/+1
The stable reexport `std::collections::Bound` is now deprecated. Another deprecated reexport could be added in `alloc`, but that crate is unstable.
2018-01-20Rename std::ptr::Shared to NonNullSimon Sapin-3/+3
`Shared` is now a deprecated `type` alias. CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629
2017-12-23Annotate raw pointer target typesChristopher Durham-2/+3
cc https://github.com/rust-lang/rust/issues/46906 cc https://github.com/rust-lang/rust/pull/46914
2017-12-22fix errors in rustc_data_structuresMichael Hewson-1/+1
2017-11-21fix some typosMartin Lindhe-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2017-08-01Fixed all unnecessary muts in language coreIsaac van Bakel-1/+1
2017-07-22Add conversions from references to NonZero pointers, Unique, and SharedSimon Sapin-1/+1
2017-07-22Rename {NonZero,Shared,Unique}::new to new_uncheckedSimon Sapin-1/+1
2017-06-30Revert "Stabilize RangeArgument"Steven Fackler-2/+3
This reverts commit 143206d54d7558c2326212df99efc98110904fdb.
2017-06-24Stabilize RangeArgumentSteven Fackler-3/+2
Move it and Bound to core::ops while we're at it. Closes #30877
2017-05-04fallout from NonZero/Unique/Shared changesAlexis Beingessner-1/+1
2017-04-12ICH: Hash everything that gets encoded into crate metadata.Michael Woerister-0/+6
2017-04-09Move away from the ad-hoc NoDrop unionsSimonas Kazlauskas-29/+8
2017-03-17Stabilize rc_raw feature, closes #37197Aaron Turon-2/+1
2017-01-29Remove dead recursive partial eq implest31-8/+0
Its nowhere used (if it had been used used, the rust stack would have overflown due to the recursion). Its presence was confusing for mrustc.
2017-01-14add required imports & featureDjzin-0/+1
2017-01-14update array_vec to use new rangeargumentdjzin-2/+10
2017-01-03Add drain method to AccumulateVec/ArrayVecAndrew Cann-1/+85
You can now call .drain(..) on SmallVec, AccumulateVec and ArrayVec
2016-11-11Change implementation of syntax::util::SmallVector to use ↵Mark-Simulacrum-10/+139
data_structures::SmallVec.
2016-10-25Add AccumulateVec, a potentially stack-allocated vector.Mark-Simulacrum-0/+106
AccumulateVec is generic over the Array trait, which is currently only implemented for [T; 8].