summary refs log tree commit diff
path: root/library/alloc/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2020-09-22Update library functions with stability attributesDylan MacKenzie-0/+2
This may not be strictly minimal, but all unstable functions also need a `rustc_const_unstable` attribute.
2020-09-20Rollup merge of #76866 - est31:master, r=lcnrRalf Jung-9/+1
Remove unused feature gates from library/ crates Removes some unused feature gates from library crates. It's likely not a complete list as I only tested a subset for which it's more likely that it is unused.
2020-09-20Remove some unused features from alloc core and stdest31-8/+1
2020-09-19Use `T::BITS` instead of `size_of::<T> * 8`.Mara Bos-0/+1
2020-09-18Remove unused libc feature gateest31-1/+0
Libc isn't used by alloc. And std and panic_* use libc from crates.io now, which isn't feature gated.
2020-09-16Add array window fnkadmin-0/+1
Updated issue to #75027 Update to rm oob access And hopefully fix docs as well Fixed naming conflict in test Fix test which used 1-indexing Nth starts from 0, woops Fix a bunch of off by 1 errors See https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=757b311987e3fae1ca47122969acda5a Add even more off by 1 errors And also write `next` and `next_back` in terms of `nth` and `nth_back`. Run fmt Fix forgetting to change fn name in test add nth_back test & document unsafe Remove as_ref().unwrap() Documented occurrences of unsafe, noting what invariants are maintained
2020-09-13Rollup merge of #76527 - fusion-engineering-forks:cleanup-uninit, ↵Jonas Schievink-2/+1
r=jonas-schievink Remove internal and unstable MaybeUninit::UNINIT. Looks like it is no longer necessary, as `uninit_array()` can be used instead in the few cases where it was needed. (I wanted to just add `#[doc(hidden)]` to remove clutter from the documentation, but looks like it can just be removed entirely.)
2020-09-09Remove internal and unstable MaybeUninit::UNINIT.Mara Bos-2/+1
Looks like it is no longer necessary, as uninit_array() can be used instead in the few cases where it was needed.
2020-09-09BTreeMap: avoid aliasing by avoiding slicesStein Somers-0/+1
2020-09-04Auto merge of #75207 - dylni:add-slice-check-range, r=KodrAusbors-0/+1
Add `slice::check_range` This method is useful for [`RangeBounds`] parameters. It's even been [rewritten](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/src/librustc_data_structures/sorted_map.rs#L214) [many](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/library/alloc/src/vec.rs#L1299) [times](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/library/core/src/slice/mod.rs#L2441) in the standard library, sometimes assuming that the bounds won't be [`usize::MAX`]. For example, [`Vec::drain`] creates an empty iterator when [`usize::MAX`] is used as an inclusive end bound: ```rust assert!(vec![1].drain(..=usize::max_value()).eq(iter::empty())); ``` If this PR is merged, I'll create another to use it for those methods. [`RangeBounds`]: https://doc.rust-lang.org/std/ops/trait.RangeBounds.html [`usize::MAX`]: https://doc.rust-lang.org/std/primitive.usize.html#associatedconstant.MAX [`Vec::drain`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.drain
2020-09-03get things to work under min_specialization by leaning more heavily on ↵The8472-0/+1
#[rustc_unsafe_specialization_marker]
2020-09-03avoid exposing that binary heap's IntoIter is backed by vec::IntoIter, use a ↵The8472-1/+1
private trait instead
2020-09-03fix build issue due to stabilized featureThe8472-0/+1
2020-09-03remove unecessary feature flagThe8472-1/+0
# Conflicts: # library/alloc/src/lib.rs
2020-09-03hide binary_heap::IntoIter internals behind impl TraitThe8472-0/+1
2020-09-03recover vectorizationThe8472-0/+1
switch to try_fold and segregate the drop handling to keep collect::<Vec<u8>>() and similar optimizer-friendly It comes at the cost of less accurate debug_asserts and code complexity
2020-09-03in-place collect for Vec. Box<[]> and BinaryHeap IntoIter and some adaptersThe8472-0/+1
2020-08-24Auto merge of #75505 - Dylan-DPC:feature/arc_new, r=KodrAusbors-1/+0
Add Arc::new_cyclic Rework of #72443 References #75861 cc @Diggsey @RalfJung r? @KodrAus
2020-08-22stabilize ptr_offset_fromRalf Jung-1/+0
2020-08-21Use intra-doc-links in `alloc`LeSeulArtichaut-5/+5
2020-08-16Replace ad hoc implementations with `slice::check_range`dylni-0/+1
2020-08-14Move btree unit test to their native, privileged locationStein Somers-0/+3
2020-08-14BTreeMap: refactor splitpoint and move testing over to unit testStein Somers-0/+1
2020-08-14fix duplicated feature gateDPC-1/+0
2020-08-13Add Arc::new_cyclicDPC-1/+1
2020-08-04Replace `Memoryblock` with `NonNull<[u8]>`Tim Diekmann-0/+3
2020-08-01Auto merge of #74373 - lcnr:array_chunks, r=withoutboatsbors-0/+1
add `slice::array_chunks` to std Now that #74113 has landed, these methods are suddenly usable. A rebirth of #72334 Tests are directly copied from `chunks_exact` and some additional tests for type inference. r? @withoutboats as you are both part of t-libs and working on const generics. closes #60735
2020-07-30Remove deny for intra doc link failures from library code, it's no longer ↵Manish Goregaokar-1/+0
necessary
2020-07-30Rename in libraryManish Goregaokar-1/+1
2020-07-30liballoc export ArrayChunksBastian Kauschke-0/+1
2020-07-27mv std libs to library/mark-0/+186