about summary refs log tree commit diff
path: root/src/liballoc/boxed.rs
AgeCommit message (Collapse)AuthorLines
2017-08-28Merge branch 'master' of https://github.com/rust-lang/rust into genJohn Kåre Alsaker-1/+1
2017-08-24Fix inconsistent doc headingslukaramu-1/+1
This fixes headings reading "Unsafety" and "Example", they should be "Safety" and "Examples" according to RFC 1574.
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-07-28Rename State to GeneratorStateJohn Kåre Alsaker-2/+2
2017-07-28Remove support for `gen arg`Alex Crichton-4/+4
2017-07-28Fill in generator tracking issue in a few more locationsAlex Crichton-1/+1
2017-07-28std: Add forwarding impls of `Generator` traitAlex Crichton-1/+12
2017-07-22Add Box::into_uniqueSimon Sapin-0/+31
2017-07-10Correct some stability attributesOliver Middleton-2/+2
These show up in rustdoc so need to be correct.
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-14/+13
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-06-23Removed as many "```ignore" as possible.kennytm-1/+3
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-13Merge crate `collections` into `alloc`Murarth-0/+2
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-04Deprecate heap::EMPTY in favour of Unique::empty or otherwise.Alexis Beingessner-1/+1
2017-04-24More methods for str boxes.Clar Charr-5/+13
2017-03-08Box docs: no allocation is done for ZSTs.Clar Charr-0/+2
2017-02-14Conversions between CStr/OsStr/Path and boxes.Clar Charr-0/+8
2017-02-06Direct conversions between slices and boxes.Clar Charr-0/+17
2017-02-03Bump version, upgrade bootstrapAlex Crichton-1/+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-01-30Implement Drop for BoxVadim Petrochenkov-0/+8
2017-01-30Merge ty::TyBox into ty::TyAdtVadim Petrochenkov-0/+1
2016-12-12rustdoc: escape the deprecated and unstable reason textEsteban Küber-4/+4
2016-12-07Auto merge of #38149 - bluss:is-empty, r=alexcrichtonbors-1/+8
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-04alloc: Forward ExactSizeIterator methods in Iterator for Box<I>Ulrik Sverdrup-1/+8
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-09-19Add missing urls for Box docGuillaume Gomez-2/+6
2016-09-11Documentation of what does for each typeathulappadan-0/+1
2016-08-27Doc: explain why Box/Rc/Arc methods do not take selfGeorg Brandl-0/+4
This can be confusing for newcomers, especially due to the argument name "this".
2016-08-26Replace unnecessary uses of `TraitObject` with castsAndrew Paseltiner-7/+2
2016-08-18Add a FusedIterator trait.Steven Allen-0/+4
This trait can be used to avoid the overhead of a fuse wrapper when an iterator is already well-behaved. Conforming to: RFC 1581 Closes: #35602
2016-07-11Improve boxed docsGuillaume Gomez-3/+46
2016-05-28rustfmt liballoc folderSrinivas Reddy Thatiparthy-2/+3
2016-05-12fix tidyAlex Burka-4/+8
2016-05-12update "reason" for fnbox feature gateAlex Burka-4/+4
It isn't "newly introduced" anymore.
2016-03-11alloc: Add unstable issue for FnBox APIsAlex Crichton-4/+4
2016-02-08Implement fmt::Pointer for pointers to unsized typesKamal Marhubi-1/+1
This allows printing pointers to unsized types with the {:p} formatting directive. The following impls are extended to unsized types: - impl<'a, T: ?Sized> Pointer for &'a T - impl<'a, T: ?Sized> Pointer for &'a mut T - impl<T: ?Sized> Pointer for *const T - impl<T: ?Sized> Pointer for *mut T - impl<T: ?Sized> fmt::Pointer for Box<T> - impl<T: ?Sized> fmt::Pointer for Rc<T> - impl<T: ?Sized> fmt::Pointer for Arc<T>
2016-01-14Rollup merge of #30912 - tshepang:remove-distraction, r=steveklabnikSteve Klabnik-1/+1
2016-01-14Rollup merge of #30910 - tshepang:improve-description, r=steveklabnikSteve Klabnik-1/+1
2016-01-14doc: that suffix serves as mere distractionTshepang Lekhonkhobe-1/+1
2016-01-14doc: "x" is used as variable name on this API, so avoid using it hereTshepang Lekhonkhobe-1/+1
2016-01-14doc: "moves" has a specific meaning in Rust, so avoid using it hereTshepang Lekhonkhobe-1/+1
2016-01-13Improve grammar of Box::{into,from}_raw docsJake Goulding-14/+14
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-1/+0
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-11-24rustfmt: liballoc, liballoc_*, libarenaNick Cameron-8/+6
2015-11-18Add missing annotations and some testsVadim Petrochenkov-0/+22
2015-11-16Auto merge of #29580 - alexbool:smart-pointer-conversion, r=alexcrichtonbors-0/+8
Sometimes when writing generic code you want to abstract over owning/pointer type so that calling code isn't restricted by one concrete owning/pointer type. This commit makes possible such code: ```rust fn i_will_work_with_arc<T: Into<Arc<MyTy>>>(t: T) { let the_arc = t.into(); // Do something } i_will_work_with_arc(MyTy::new()); i_will_work_with_arc(Box::new(MyTy::new())); let arc_that_i_already_have = Arc::new(MyTy::new()); i_will_work_with_arc(arc_that_i_already_have); ``` Please note that this patch doesn't work with DSTs. Also to mention, I made those impls stable, and I don't know whether they should be actually stable from the beginning. Please tell me if this should be feature-gated.
2015-11-16Fix feature nameAlexander Bulaev-1/+1
2015-11-06Remove stability annotations from trait impl itemsVadim Petrochenkov-2/+0
Remove `stable` stability annotations from inherent impls
2015-11-04liballoc: implement From for Box, Rc, ArcAlexander Bulaev-0/+8
Sometimes when writing generic code you want to abstract over owning/pointer type so that calling code isn't restricted by one concrete owning/pointer type. This commit makes possible such code: ``` fn i_will_work_with_arc<T: Into<Arc<MyTy>>>(t: T) { let the_arc = t.into(); // Do something } i_will_work_with_arc(MyTy::new()); i_will_work_with_arc(Box::new(MyTy::new())); let arc_that_i_already_have = Arc::new(MyTy::new()); i_will_work_with_arc(arc_that_i_already_have); ``` Please note that this patch doesn't work with DSTs.