about summary refs log tree commit diff
path: root/src/liballoc/lib.rs
AgeCommit message (Collapse)AuthorLines
2019-10-22Add Cow::is_borrowed and Cow::is_ownedClar Fon-0/+1
2019-10-13Rollup merge of #65214 - Amanieu:cfg_atomic, r=alexcrichtonMazdak Farrokhzad-1/+1
Split non-CAS atomic support off into target_has_atomic_load_store This PR implements my proposed changes in https://github.com/rust-lang/rust/issues/32976#issuecomment-518542029 by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s: * `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations). * ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS). cc #32976 r? @alexcrichton
2019-10-08Stabilize mem::take (mem_take)Jon Gjengset-1/+0
Tracking issue: https://github.com/rust-lang/rust/issues/61129
2019-10-08Split non-CAS atomic support off into target_has_atomic_load_storeAmanieu d'Antras-1/+1
2019-09-25Snap cfgs to new betaMark Rousskov-1/+0
2019-09-16Const-stabilize `Vec::new`.Mazdak Farrokhzad-1/+1
2019-09-07Improve hygiene of `alloc::format!`Vadim Petrochenkov-0/+6
2019-08-16Add the Layout of the failed allocation to TryReserveError::AllocErrorSimon Sapin-0/+1
… and add a separately-unstable field to force non-exhaustive matching (`#[non_exhaustive]` is no implemented yet on enum variants) so that we have the option to later expose the allocator’s error value. CC https://github.com/rust-lang/wg-allocators/issues/23
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-3/+3
2019-08-08Use associated_type_bounds where applicable - closes #61738Ilija Tovilo-0/+1
2019-08-05Add implementations for converting boxed slices into boxed arraysJake Goulding-1/+1
This mirrors the implementations of reference slices into arrays.
2019-07-30Rollup merge of #63095 - Centril:incomplete-features-lint, r=varkorMazdak Farrokhzad-0/+1
Turn `INCOMPLETE_FEATURES` into lint We do this because it is annoying to see the warning when building rustc and because this is better from a "separation of concerns" POV. The drawback to this change is that this will respect `--cap-lints`. Also note that this is not a buffered lint so if there are fatal parser errors then the lint will not trigger. r? @varkor
2019-07-30Rollup merge of #62469 - czipperz:liballoc-add-doc-links, r=GuillaumeGomezMazdak Farrokhzad-13/+19
Add doc links to liballoc crate page
2019-07-30Allow 'incomplete_features' in libcore/alloc.Mazdak Farrokhzad-0/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-2/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-28Use const generics for some Vec/CCow impls.Mazdak Farrokhzad-0/+2
2019-07-21use a const to hack around promotion limitationsRalf Jung-0/+1
2019-07-19use const array repeat expressions for uninit_arrayRalf Jung-0/+1
2019-07-13Auto merge of #61953 - Centril:shared-from-iter, r=RalfJungbors-0/+1
Add `impl<T> FromIterator<T> for Arc/Rc<[T]>` Add implementations of `FromIterator<T> for Arc/Rc<[T]>` with symmetrical logic. This also takes advantage of specialization in the case of iterators with known length (`TrustedLen`) to elide the final allocation/copying from a `Vec<T>` into `Rc<[T]>` because we can allocate the space for the `Rc<[T]>` directly when the size is known. This is the primary motivation and why this is to be preferred over `iter.collect::<Vec<_>>().into(): Rc<[T]>`. Moreover, this PR does some refactoring in some places. r? @RalfJung for the code cc @alexcrichton from T-libs
2019-07-07Add doc links to liballoc crate pageChris Gregory-13/+19
2019-07-04Switch master to 1.38Mark Rousskov-1/+0
2019-07-01Enable mem_take feature in relevant cratesChris Gregory-0/+1
2019-06-20deduplicate slice_from_raw_parts_mut.Mazdak Farrokhzad-1/+1
2019-06-20shared_from_iter/Rc: Use specialization to elide allocation.Mazdak Farrokhzad-0/+1
2019-06-16Separate liballoc modulechansuke-1/+1
2019-06-08Turn `#[allocator]` into a built-in attribute and rename it to ↵Vadim Petrochenkov-1/+1
`#[rustc_allocator]`
2019-05-30Stabilize iter_nth_back featureLzu Tao-1/+0
2019-05-20stabilize core parts of MaybeUninit and deprecate mem::uninitialized in the ↵Ralf Jung-1/+1
future Also expand the documentation a bit
2019-05-04Remove unused feature(need_allocator).Mazdak Farrokhzad-1/+0
2019-04-23Stabilize futures_apiTaylor Cramer-1/+0
2019-04-15warn(missing_docs) in liballoc, and add missing docsRalf Jung-0/+1
2019-04-14make lint levels more consistentRalf Jung-3/+3
2019-04-14bump stdsimd; make intra_doc_link_resolution_failure an error againRalf Jung-1/+1
2019-04-14Rollup merge of #59675 - SimonSapin:stable-alloc, r=alexcrichtonMazdak Farrokhzad-4/+1
Stabilize the `alloc` crate. This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-12Stabilize the `alloc` crate.Simon Sapin-4/+1
This implements RFC 2480: * https://github.com/rust-lang/rfcs/pull/2480 * https://github.com/rust-lang/rfcs/blob/master/text/2480-liballoc.md Closes https://github.com/rust-lang/rust/issues/27783
2019-04-05Add Fn* blanket impls for Box.Masaki Hara-0/+1
2019-03-24Rollup merge of #59328 - koalatux:iter-nth-back, r=scottmcmkennytm-0/+1
Implement specialized nth_back() for Box and Windows. Hi there, this is my first pull request to rust :-) I started implementing some specializations for DoubleEndedIterator::nth_back() and these are the first two. The problem has been discussed in #54054 and nth_back() is tracked in #56995. I'm stuck with the next implementation so I though I do a PR for the ones I'm confident with to get some feedback.
2019-02-16implement nth_back for BoxAdrian Friedli-0/+1
2019-02-16Rollup merge of #58468 - RalfJung:maybe-uninit-split, r=Centrilkennytm-1/+1
split MaybeUninit into several features, expand docs a bit This splits the `maybe_uninit` feature gate into several: * `maybe_uninit` for what we will hopefully stabilize soon-ish. * `maybe_uninit_ref` for creating references into `MaybeUninit`, for which the rules are not yet clear. * `maybe_uninit_slice` for handling slices of `MaybeUninit`, which needs more API design work. * `maybe_uninit_array` for creating arrays of `MaybeUninit` using a macro (because we don't have https://github.com/rust-lang/rust/issues/49147 yet). Is that an okay thing to do? The goal is to help people avoid APIs we do not want to stabilize yet. I used this to make sure rustc itself does not use `get_ref` and `get_mut`. I also extended the docs to advise against uninitialized integers -- again this is something for which the rules are still being discussed.
2019-02-14make Centril happyRalf Jung-1/+1
2019-02-14split MaybeUninit into several features, expand docs a bitRalf Jung-1/+1
2019-02-12Merging masterMatthias Einwag-4/+3
2019-02-12New return types for str::escape_* that impl Display and Iterator<char>Simon Sapin-1/+2
As FCP’ed in the tracking issue: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-03Update the future/task APIMatthias Einwag-4/+0
This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592. Changes: - Replacing UnsafeWake with RawWaker and RawWakerVtable - Removal of LocalWaker - Removal of Arc-based Wake trait
2019-02-03Auto merge of #58081 - Centril:liballoc-2018, r=oli-obkbors-3/+4
Transition liballoc to Rust 2018 This transitions liballoc to Rust 2018 edition and applies relevant idiom lints. I also did a small bit of drive-by cleanup along the way. r? @oli-obk I started with liballoc since it seemed easiest. In particular, adding `edition = "2018"` to libcore gave me way too many errors due to stdsimd. Ideally we should be able to continue this crate-by-crate until all crates use 2018.
2019-02-02liballoc: remove redundant extern crate.Mazdak Farrokhzad-2/+0
2019-02-02liballoc: fix some idiom lints.Mazdak Farrokhzad-0/+3
2019-02-02liballoc: adjust abolute imports + more import fixes.Mazdak Farrokhzad-1/+1
2019-02-01Stabilize split_ascii_whitespaceSimon Sapin-1/+0
Tracking issue FCP to merge: https://github.com/rust-lang/rust/issues/48656#issuecomment-442372750