about summary refs log tree commit diff
path: root/src/liballoc
AgeCommit message (Collapse)AuthorLines
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
2016-12-07Auto merge of #38149 - bluss:is-empty, r=alexcrichtonbors-1/+9
Forward more ExactSizeIterator methods and `is_empty` edits - Forward ExactSizeIterator methods in more places, like `&mut I` and `Box<I>` iterator impls. - Improve `VecDeque::is_empty` itself (see commit 4) - All the collections iterators now have `len` or `is_empty` forwarded if doing so is a benefit. In the remaining cases, they already use a simple size hint (using something like a stored `usize` value), which is sufficient for the default implementation of len and is_empty.
2016-12-05Add missing links to Rc docGuillaume Gomez-43/+45
2016-12-04alloc: Forward ExactSizeIterator methods in Iterator for Box<I>Ulrik Sverdrup-1/+9
2016-12-02core: Remove Self: Sized from Iterator::nthUlrik Sverdrup-0/+3
It is an unnecessary restriction; nth neither needs self to be sized nor needs to be exempted from the trait object. It increases the utility of the nth method, because type specific implementations are available through `&mut I` or through an iterator trait object. It is a backwards compatible change due to the special cases of the `where Self: Sized` bound; it was already optional to include this bound in `Iterator` implementations.
2016-11-11[breaking-change] change the `box_free` item to accept pointers to unsized typesOliver 'ker' Schneider-4/+5
2016-11-10drop an unnecessary newlineJorge Aparicio-1/+0
2016-11-10use an 'imp' module to reduce the amount of cfgsJorge Aparicio-27/+32
2016-11-09Auto merge of #37657 - steveklabnik:rollup, r=steveklabnikbors-5/+11
Rollup of 8 pull requests - Successful merges: #35102, #37425, #37483, #37588, #37601, #37610, #37650, #37652 - Failed merges:
2016-11-08Auto merge of #37192 - cristicbz:rust-rc-into-raw, r=brsonbors-0/+190
Add `{into,from}_raw` to Rc and Arc These methods convert to and from a `*const T` for `Rc` and `Arc` similar to the way they work on `Box`. The only slight complication is that `from_raw` needs to offset the pointer back to find the beginning of the `RcBox`/`ArcInner`. I felt this is a fairly small addition, filling in a gap (when compared to `Box`) so it wouldn't need an RFC. The motivation is primarily for FFI. (I'll create an issue and update a PR with the issue number if reviewers agree with the change in principle **Edit: done #37197**) ~~Edit: This was initially `{into,from}_raw` but concerns were raised about the possible footgun if mixed with the methods of the same name of `Box`.~~ Edit: This was went from `{into,from}_raw` to `{into,from}_inner_raw` then back to `{into,from}_raw` during review.
2016-11-08More proeminent warning in Arc::{strong,weak}_count docs.Simon Sapin-5/+11
2016-11-06Add a comment to `Arc::MAX_REFCOUNT`Daan Sprenkels-0/+4
The constant name `MAX_REFCOUNT` suggests that the value is a _hard_ limit on the amount of references to an `Arc`. This is a more soft limit however. This commit adds a comment to the constant to annotate this. See also: PR #37605
2016-11-05Add `{into,from}_raw` to Rc and ArcCristi Cobzarenco-0/+190
2016-10-30make `alloc` and `collections` compilable for thumbv6m-none-eabiJorge Aparicio-0/+17
by cfging away `alloc::Arc` and changing OOM to abort for this target
2016-10-16run rustfmt on various foldersSrinivas Reddy Thatiparthy-11/+3
2016-10-13Add assert checking that allocation and deallocation sizes are equalVadim Petrochenkov-3/+4
2016-10-13Add an unstable constructor for creating `Rc<str>` from `str`Vadim Petrochenkov-1/+26
2016-10-04Apply some Arc doc changes to RcKeegan McAllister-11/+21