summary refs log tree commit diff
path: root/src/liballoc/boxed.rs
AgeCommit message (Collapse)AuthorLines
2017-12-21Revert "Auto merge of #45225 - eddyb:trans-abi, r=arielb1"Ariel Ben-Yehuda-14/+4
This reverts commit f50fd075c2555d8511ccee8a7fe7aee3f2c45e14, reversing changes made to 5041b3bb3d953a14f32b15d1e41341c629acae12.
2017-11-19rustc: don't special-case Box<T> as having a pointer layout.Eduard-Mihai Burtescu-4/+14
2017-10-10Auto merge of #44877 - nvzqz:box-conversions, r=alexcrichtonbors-4/+40
Improve raw Box conversions This PR has two goals: - Reduce use of `mem::transmute` in `Box` conversions I understand that `mem::transmute`-ing non `#[repr(C)]` types is implementation-defined behavior. This may not matter within the reference implementation of Rust, but I believe it's important to remain consistent. For example, I noticed that `str::from_utf8_unchecked` went from using `mem::transmute` to using pointer casts. - Make `Box` pointer conversions more straightforward regarding `Unique`
2017-10-06Add unique feature in Box::from_unique docsNikolai Vazquez-3/+7
2017-10-06Add missing word in Box::from_unique docsNikolai Vazquez-2/+2
2017-10-06Create Box::from_unique functionNikolai Vazquez-3/+35
Provides a reasonable interface for Box::from_raw implementation. Does not get around the requirement of mem::transmute for converting back and forth between Unique and Box.
2017-10-06Revert to using mem::transmute in Box::from_rawNikolai Vazquez-1/+1
Same reasons as commit 904133e1e28b690e2bbd101b719509aa897539a0.
2017-10-06Revert to using mem::transmute in Box::into_uniqueNikolai Vazquez-3/+1
Seems to cause this error: "Cannot handle boxed::Box<[u8]> represented as TyLayout".
2017-09-27Remove mem::transmute used in Box<str> conversionsNikolai Vazquez-3/+1
2017-09-26Remove uses of mem::transmute in Box methodsNikolai Vazquez-3/+5
Makes use of conversions via Unique.
2017-09-12impl Hasher for {&mut Hasher, Box<Hasher>}kennytm-1/+47
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