about summary refs log tree commit diff
path: root/src/liballoc
AgeCommit message (Collapse)AuthorLines
2018-06-13Improve core::task::TaskObjJosef Reinhard Brandl-4/+4
2018-06-12Stabilize #[repr(transparent)]Simon Sapin-1/+1
Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318 Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
2018-06-12Auto merge of #51241 - glandium:globalalloc, r=sfackler,SimonSapinbors-190/+127
Stabilize GlobalAlloc and #[global_allocator] This PR implements the changes discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-393263510 Fixes #49668 Fixes #27389 This does not change the default global allocator: #36963
2018-06-11More alloc docs tweaksSimon Sapin-2/+4
2018-06-11Stabilize alloc::oom (but not set_oom_hook or take_oom_hook)Simon Sapin-1/+1
2018-06-11Stabilize alloc free functions for the global allocators.Simon Sapin-4/+4
2018-06-11Stablize the alloc module without changing stability of its contents.Simon Sapin-6/+5
2018-06-11Document memory allocation APIsSimon Sapin-0/+65
Add some docs where they were missing, attempt to fix them where they were out of date.
2018-06-11Remove some unneeded castsSimon Sapin-3/+3
2018-06-11Remove the deprecated Heap type/constSimon Sapin-9/+0
2018-06-11Remove deprecated heap modulesSimon Sapin-118/+0
The heap.rs file was already unused.
2018-06-11Replace `impl GlobalAlloc for Global` with a set of free functionsMike Hommey-23/+25
2018-06-11Remove alloc::Opaque and use *mut u8 as pointer type for GlobalAllocMike Hommey-47/+43
2018-06-11Auto merge of #51442 - tinaun:more-future-impls, r=cramertjbors-0/+19
[futures] add a few blanket impls to std these were defined in the futures crate, but with the core definitions moving to std these would need to move too.
2018-06-10Stabilize entry-or-defaultGuillaume Gomez-2/+1
2018-06-10Auto merge of #51320 - tmccombs:step-by, r=SimonSapinbors-1/+0
Stabilize Iterator::step_by Fixes #27741
2018-06-08addressed nitstinaun-21/+0
2018-06-08add a few blanket future impls to stdtinaun-0/+40
2018-06-06Auto merge of #51263 - cramertj:futures-in-core, r=aturonbors-0/+239
Add Future and task system to the standard library This adds preliminary versions of the `std::future` and `std::task` modules in order to unblock development of async/await (https://github.com/rust-lang/rust/issues/50547). These shouldn't be considered as final forms of these libraries-- design questions about the libraries should be left on https://github.com/rust-lang/rfcs/pull/2418. Once that RFC (or a successor) is merged, these APIs will be adjusted as necessary. r? @aturon
2018-06-06Add Future and task system to the standard libraryTaylor Cramer-0/+239
2018-06-03Reexport fmt::Alignment into stdGuillaume Gomez-0/+2
2018-06-02Stabilize Iterator::step_byThayne McCombs-1/+0
Fixes #27741
2018-06-02Rollup merge of #51312 - frewsxcv:clarify-hash-map-entry-get-mut, r=dtolnayMark Simulacrum-2/+15
Clarify the difference between get_mut and into_mut for OccupiedEntry The examples for both hash_map::OccupiedEntry::get_mut and hash_map::OccupiedEntry::into_mut were almost identical. This led to some confusion over the difference, namely why you would ever use get_mut when into_mut gives alonger lifetime. Reddit thread: https://www.reddit.com/r/rust/comments/8a5swr/why_does_hashmaps This commit adds two lines and a comment to the example, to show that the entry object can be re-used after calling get_mut. Closes https://github.com/rust-lang/rust/issues/49745
2018-06-02Rollup merge of #51306 - kennytm:impl-default-for-mut-str, r=SimonSapinMark Simulacrum-0/+1
impl Default for &mut str Rationale: There is already `impl Default for &mut [T]`. Note: This impl is insta-stable.
2018-06-02Copy changes from HashMap over to BTreeMap.Corey Farwell-2/+15
2018-06-02Rollup merge of #51147 - tmccombs:sliceindex, r=SimonSapinMark Simulacrum-2/+1
Stabilize SliceIndex trait. CC #35729 According to recommendations in https://github.com/rust-lang/rust/issues/35729#issuecomment-377784884
2018-06-03impl Default for &mut strkennytm-0/+1
2018-06-01incorporate changes from code reviewEmerentius-38/+46
further reduce unsafe fn calls reduce right drift assert! sufficient capacity
2018-06-01compacts join codeEmerentius-30/+14
2018-06-01add more join testsEmerentius-0/+22
old tests cover the new fast path of str joining already this adds tests for joining into Strings with long separators (>4 byte) and for joining into Vec<T>, T: Clone + !Copy. Vec<T: Copy> will be specialised when specialisation type inference bugs are fixed.
2018-06-01optimize joining and concatenation for slicesEmerentius-47/+113
for both Vec<T> and String - eliminates the boolean first flag in fn join() for String only - eliminates repeated bounds checks in join(), concat() - adds fast paths for small string separators up to a len of 4 bytes
2018-06-01Stabilize SliceIndex trait.Thayne McCombs-2/+1
Fixes #35729 According to recommendations in https://github.com/rust-lang/rust/issues/35729#issuecomment-377784884
2018-05-31Update `Arc` and `Rc` to use `NonNull::cast` to cast the inner pointersJeremy Fitzhardinge-17/+6
This avoids an `unsafe` block in each case.
2018-05-31Implement `downcast` for `Arc<Any + Send + Sync>`Jeremy Fitzhardinge-0/+64
We only need to implement it for `Any + Send + Sync` because in practice that's the only useful combination for `Arc` and `Any`. Implementation for #44608 under the `rc_downcast` feature.
2018-05-30Pass a `Layout` to `oom`Mike Hommey-82/+91
As discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-384893456 and subsequent, there are use-cases where the OOM handler needs to know the size of the allocation that failed. The alignment might also be a cause for allocation failure, so providing it as well can be useful.
2018-05-26Auto merge of #51082 - kennytm:rollup, r=kennytmbors-2/+4
Rollup of 11 pull requests Successful merges: - #50987 (Underline multiple suggested replacements in the same line) - #51014 (Add documentation about env! second argument) - #51034 (Remove unused lowering field and method) - #51047 (Use AllFacts from polonius-engine) - #51048 (Add more missing examples for Formatter) - #51056 (Mention and use `Once::new` instead of `ONCE_INIT`) - #51059 (What does an expression look like, that consists only of special characters?) - #51065 (Update nomicon link in transmute docs) - #51067 (Add inner links in documentation) - #51070 (Fail typecheck if we encounter a bogus break) - #51073 (Rename TokenStream::empty to TokenStream::new) Failed merges:
2018-05-26Rollup merge of #51067 - mcarton:patch-1, r=steveklabnikkennytm-2/+4
Add inner links in documentation From [this SO question](https://stackoverflow.com/q/50518757/2733851) it looks like this page isn't really clear. I personally do think this page is quite clear, the only think I could think of was adding some references.
2018-05-26Auto merge of #51041 - alexcrichton:better-unwind, r=nikomatsakisbors-0/+1
std: Ensure OOM is classified as `nounwind` OOM can't unwind today, and historically it's been optimized as if it can't unwind. This accidentally regressed with recent changes to the OOM handler, so this commit adds in a codegen test to assert that everything gets optimized away after the OOM function is approrpiately classified as nounwind Closes #50925
2018-05-25Auto merge of #51033 - coryshrmn:master, r=dtolnaybors-11/+11
stabilize RangeBounds collections_range #30877 The FCP for #30877 closed last month, with the decision to: 1. move from `collections::range::RangeArgument` to `ops::RangeBounds`, and 2. rename `start()` and `end()` to `start_bounds()` and `end_bounds()`. Simon Sapin already moved it to `ops::RangeBounds` in #49163. I renamed the functions, and removed the old `collections::range::RangeArgument` alias. This is my first Rust PR, please let me know if I can improve anything. This passes all tests for me, except the `clippy` tool (which uses `RangeArgument::start()`). I considered deprecating `start()` and `end()` instead of removing them, but the contribution guidelines indicate we can break `clippy` temporarily. I thought it was best to remove the functions, since we're worried about name collisions with `Range::start` and `end`. Closes #30877.
2018-05-25Add inner links in documentationMartin Carton-2/+4
From [this SO question](https://stackoverflow.com/q/50518757/2733851) it looks like this page isn't really clear. I personally do think this page is quite clear, the only think I could think of was adding some references.
2018-05-24std: Ensure OOM is classified as `nounwind`Alex Crichton-0/+1
OOM can't unwind today, and historically it's been optimized as if it can't unwind. This accidentally regressed with recent changes to the OOM handler, so this commit adds in a codegen test to assert that everything gets optimized away after the OOM function is approrpiately classified as nounwind Closes #50925
2018-05-24stabilize RangeBounds collections_range #30877Cory Sherman-11/+11
rename RangeBounds::start() -> start_bound() rename RangeBounds::end() -> end_bound()
2018-05-22Make `Unpin` safe to implementTaylor Cramer-1/+1
2018-05-23Rollup merge of #50945 - stjepang:stabilize-from-ref, r=SimonSapinkennytm-2/+2
Stabilize feature from_ref Function `from_ref_mut` is now renamed to `from_mut`, as discussed in #45703. Closes #45703. r? @SimonSapin
2018-05-21Auto merge of #49283 - varkor:combining-chars-escape_debug, r=SimonSapinbors-1/+17
Escape combining characters in char::Debug Although combining characters are technically printable, they make little sense to print on their own with `Debug`: it'd be better to escape them like non-printable characters. This is a breaking change, but I imagine the fact `escape_debug` is rare and almost certainly primarily used for debugging that this is an acceptable change. Resolves #41922. r? @alexcrichton cc @clarcharr
2018-05-21Avoid counting characters and add explanatory comment to testvarkor-1/+13
2018-05-21Only escape extended grapheme characters in the first positionvarkor-2/+5
2018-05-21Make {char, str}::escape_debug and impl Debug for {char, str} consistentvarkor-0/+1
2018-05-21Stabilize feature from_refStjepan Glavina-2/+2
2018-05-21Auto merge of #50739 - gnzlbg:vec_reserve, r=sfacklerbors-2/+2
Switch Vec from doubling size on growth to using RawVec's reserve On growth, Vec does not require to exactly double its size for correctness, like, for example, VecDeque does. Using reserve instead better expresses this intent. It also allows to reuse Excess capacity on growth and for better growth-policies to be provided by RawVec. r? @sfackler