about summary refs log tree commit diff
path: root/src/liballoc
AgeCommit message (Collapse)AuthorLines
2017-05-20Correct some stability versionsOliver Middleton-1/+1
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-05-09Improve docs on Arc<T> and Send/Syncsteveklabnik-10/+29
This is something I always forget, so let's actually explain in the docs.
2017-05-05Rollup merge of #41064 - Gankro:ptr-redux, r=alexcrichtonCorey Farwell-64/+53
refactor NonZero, Shared, and Unique APIs Major difference is that I removed Deref impls, as apparently LLVM has trouble maintaining metadata with a `&ptr -> &ptr` API. This was cited as a blocker for ever stabilizing this API. It wasn't that ergonomic anyway. * Added `get` to NonZero to replace Deref impl * Added `ptr` getter to Shared/Unique to replace Deref impl * Added Unique's `get` and `get_mut` conveniences to Shared * Deprecated `as_mut_ptr` on Shared in favour of `ptr` Note that Shared used to primarily expose only `*const` but there isn't a good justification for that, so I made it `*mut`.
2017-05-04Deprecate heap::EMPTY in favour of Unique::empty or otherwise.Alexis Beingessner-17/+17
2017-05-04fallout from NonZero/Unique/Shared changesAlexis Beingessner-48/+37
2017-05-03Document the reasoning for the Acquire/Release handshake when dropping Arcs.Bobby Holley-0/+11
2017-04-29Update stage0 bootstrap compilerAlex Crichton-1/+0
We've got a freshly minted beta compiler, let's update to use that on nightly! This has a few other changes associated with it as well * A bump to the rustc version number (to 1.19.0) * Movement of the `cargo` and `rls` submodules to their "proper" location in `src/tools/{cargo,rls}`. Now that Cargo workspaces support the `exclude` option this can work. * Updates of the `cargo` and `rls` submodules to their master branches. * Tweak to the `src/stage0.txt` format to be more amenable for Cargo version numbers. On the beta channel Cargo will bootstrap from a different version than rustc (e.g. the version numbers are different), so we need different configuration for this. * Addition of `dev` as a readable key in the `src/stage0.txt` format. If present then stage0 compilers are downloaded from `dev-static.rust-lang.org` instead of `static.rust-lang.org`. This is added to accomodate our updated release process with Travis and AppVeyor.
2017-04-26Auto merge of #41258 - clarcharr:str_box_extras, r=Kimundibors-5/+36
More methods for str boxes. (reduce Box<[u8]> ↔ Box<str> transmutes) This is a follow-up to #41096 that adds safer methods for converting between `Box<str>` and `Box<[u8]>`. They're gated under a different feature from the `&mut str` methods because they may be too niche to include in public APIs, although having them internally helps reduce the number of transmutes the standard library uses. What's added: * `From<Box<str>> for Box<[u8]>` * `<Box<str>>::into_boxed_bytes` (just calls `Into::into`) * `alloc::str` (new module) * `from_boxed_utf8` and `from_boxed_utf8_unchecked`, defined in `alloc:str`, exported in `collections::str` * exports `from_utf8_mut` in `collections::str` (missed from previous PR)
2017-04-24More methods for str boxes.Clar Charr-5/+36
2017-04-23Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichtonbors-18/+1
Remove items that are unstable and deprecated This removes unstable items that have been deprecated for more than one cycle. - Since 1.16.0, `#![feature(enumset)]` - All of `mod collections::enum_set` - Since 1.15.0, `#![feature(borrow_state)]` - `cell::BorrowState` - `RefCell::borrow_state()` - Since 1.15.0, `#![feature(is_unique)]` - `Rc::is_unique()` (made private like `Arc::is_unique()`) - Since 1.15.0, `#![feature(rc_would_unwrap)]` - `Rc::would_wrap()` - Since 1.13.0, `#![feature(binary_heap_extras)]` - `BinaryHeap::push_pop()` - `BinaryHeap::replace()` - Since 1.12.0, `#![feature(as_unsafe_cell)]` - `Cell::as_unsafe_cell()` - `RefCell::as_unsafe_cell()` - Since 1.12.0, `#![feature(map_entry_recover_keys)]` - `btree_map::OccupiedEntry::remove_pair()` - `hash_map::OccupiedEntry::remove_pair()` - Since 1.11.0, `#![feature(float_extras)]` - `Float::nan()` - `Float::infinity()` - `Float::neg_infinity()` - `Float::neg_zero()` - `Float::zero()` - `Float::one()` - `Float::integer_decode()` - `f32::integer_decode()` - `f32::ldexp()` - `f32::frexp()` - `f32::next_after()` - `f64::integer_decode()` - `f64::ldexp()` - `f64::frexp()` - `f64::next_after()` - Since 1.11.0, `#![feature(zero_one)]` - `num::Zero` - `num::One`
2017-04-22cache attributes of items from foreign cratesAriel Ben-Yehuda-6/+36
this avoids parsing item attributes on each call to `item_attrs`, which takes off 33% (!) of translation time and 50% (!) of trans-item collection time.
2017-04-20Privatize Rc::is_uniqueJosh Stone-5/+1
[unstable, deprecated since 1.15.0]
2017-04-20Remove Rc::would_wrapJosh Stone-13/+0
[unstable, deprecated since 1.15.0]
2017-04-15Specialize Vec::from_elem<u8> to use calloc or memsetMatt Brubeck-1/+50
Fixes #38723.
2017-04-13Rollup merge of #41266 - projektir:weak_docs_rc, r=alexcrichtonCorey Farwell-33/+33
Updating docs for std::rc::Rc The same changes as PR [#41240 ](https://github.com/rust-lang/rust/pull/41240), but for [`std::rc::Weak`](https://doc.rust-lang.org/std/rc/struct.Weak.html). At least, as far as I am aware, the Weak pointer is the same for both, and they're basically the same, just one is thread-safe and the other is not. r? @alexcrichton
2017-04-12Updating docs for std::rc::Rcprojektir-33/+33
2017-04-12Updating docs for std::sync::Weak #29377projektir-33/+33
2017-03-20Fix up various linkssteveklabnik-2/+2
The unstable book, libstd, libcore, and liballoc all needed some adjustment.
2017-03-17Minor fixups to fix tidy errorsAlex Crichton-1/+4
2017-03-17Stabilize rc_raw feature, closes #37197Aaron Turon-26/+18
2017-03-17Stabilize ptr_eq feature, closes #36497Aaron Turon-10/+2
2017-03-13Remove function invokation parens from documentation links.Corey Farwell-2/+2
This was never established as a convention we should follow in the 'More API Documentation Conventions' RFC: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-03-08Box docs: no allocation is done for ZSTs.Clar Charr-0/+2
2017-02-20Revert "Fix up links"Steve Klabnik-2/+2
This reverts commit 7f1d1c6d9a7be5e427bace30e740b16b25f25c92. The original commit was created because mdBook and rustdoc had different generation algorithms for header links; now with https://github.com/rust-lang/rust/pull/39966 , the algorithms are the same. So let's undo this change. ... when I came across this problem, I said "eh, this isn't fun, but it doesn't take that long." I probably should have just actually taken the time to fix upstream, given that they were amenable. Oh well!
2017-02-15Auto merge of #39594 - clarcharr:cstr_box, r=aturonbors-0/+8
Conversions between CStr, OsStr, Path and boxes This closes a bit of the inconsistencies between `CStr`, `OsStr`, `Path`, and `str`, allowing people to create boxed versions of DSTs other than `str` and `[T]`. Full list of additions: * `Default` for `Box<str>`, `Box<CStr>`, `Box<OsStr>`, and `Box<Path>` (note: `Default` for `PathBuf` is already implemented) * `CString::into_boxed_c_str` (feature gated) * `OsString::into_boxed_os_str` (feature gated) * `Path::into_boxed_path` (feature gated) * `From<&CStr> for Box<CStr>` * `From<&OsStr> for Box<OsStr>` * `From<&Path> for Box<Path>` This also includes adding the internal methods: * `sys::*::os_str::Buf::into_box` * `sys::*::os_str::Slice::{into_box, empty_box}` * `sys_common::wtf8::Wtf8Buf::into_box` * `sys_common::wtf8::Wtf8::{into_box, empty_box}`
2017-02-14Conversions between CStr/OsStr/Path and boxes.Clar Charr-0/+8
2017-02-13Fix up linksSteve Klabnik-2/+2
mdbook and rustdoc generate links differently, so we need to change all these links.
2017-02-06Direct conversions between slices and boxes.Clar Charr-0/+40
2017-02-03Bump version, upgrade bootstrapAlex Crichton-9/+0
This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.
2017-02-02Rollup merge of #39299 - federicomenaquintero:master, r=GuillaumeGomezGuillaume Gomez-3/+6
In std:rc, clarify the lack of mutability inside an Rc Also, point to the example in Cell's docs for how to do it.
2017-01-31In std:rc, clarify the lack of mutability inside an RcFederico Mena Quintero-3/+6
Also, point to the example in Cell's docs for how to do it.
2017-01-30Implement Drop for BoxVadim Petrochenkov-0/+8
2017-01-30Merge ty::TyBox into ty::TyAdtVadim Petrochenkov-0/+1
2017-01-28Fix typo in liballoc/lib.rsDenis Andrejew-1/+1
2017-01-27Fix a few links in the docsOliver Middleton-1/+1
2017-01-10Rollup merge of #38664 - apasel422:may-dangle, r=pnkfelixSeo Sanghyeon-7/+5
Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]` CC #34761 r? @pnkfelix
2017-01-09Auto merge of #38244 - estebank:escape-reason-docs, r=ollie27bors-4/+4
rustdoc: escape the deprecated and unstable reason text Fix #38220. Instead of the [current output](https://doc.rust-lang.org/std/boxed/trait.FnBox.html): <img width="967" alt="incorrect unescaped unstable reason in docs" src="https://cloud.githubusercontent.com/assets/1606434/21021898/73121d42-bd2f-11e6-8076-8a5127dbc010.png"> display: <img width="979" alt="escaped unstable reason in docs" src="https://cloud.githubusercontent.com/assets/1606434/21021876/52eb0f88-bd2f-11e6-9088-58bdc7d92328.png">
2017-01-08Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrcbors-1/+1
Remove not(stage0) from deny(warnings) Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-29Rollup merge of #38587 - GuillaumeGomez:arc_docs, r=frewsxcvAlex Crichton-15/+17
Add missing urls in Arc docs r? @frewsxcv
2016-12-28Replace uses of `#[unsafe_destructor_blind_to_params]` with `#[may_dangle]`Andrew Paseltiner-7/+5
CC #34761
2016-12-27Merge branch 'master' into escape-reason-docsEsteban Küber-47/+11
2016-12-26Remove extra lang item, exchange_free; use box_free instead.Mark Simulacrum-0/+1
Trans used to insert code equivalent to box_free in a wrapper around exchange_free, and that code is now removed from trans.
2016-12-24Add missing urls in Arc docsGuillaume Gomez-15/+17
2016-12-20Inline base::malloc_raw_dyn.Mark-Simulacrum-0/+1
Move comment about not unwinding into liballoc.
2016-12-16Address falloutAaron Turon-31/+2
2016-12-15Stabilize:Aaron Turon-16/+7
- `std::rc::Rc::{strong_count, weak_count}` - `std::sync::Arc::{strong_count, weak_count}` Deprecate: - `std::rc::Rc::{would_unwrap, is_unique}`
2016-12-12rustdoc: escape the deprecated and unstable reason textEsteban Küber-4/+4
2016-12-09Auto merge of #37492 - japaric:no-atomics-alloc, r=brsonbors-15/+36
make `alloc` and `collections` compilable for thumbv6m-none-eabi by cfging away `alloc::Arc` and changing OOM to abort for this target r? @alexcrichton cc @thejpster
2016-12-07Rollup merge of #38189 - GuillaumeGomez:rc_links, r=frewsxcvGuillaume Gomez-43/+45
Add missing links to Rc doc r? @frewsxcv