about summary refs log tree commit diff
path: root/src/liballoc
AgeCommit message (Collapse)AuthorLines
2018-03-02Have Vec use slice's implementations of Index<I> and IndexMut<I>Jonathan Behrens-125/+5
2018-03-02Optimize str::repeatShotaro Yamada-3/+35
2018-02-28Rollup merge of #48450 - frewsxcv:frewsxcxv-stabilize-slice-rotatee, ↵kennytm-20/+3
r=alexcrichton Stabilize [T]::rotate_{left,right} https://github.com/rust-lang/rust/issues/41891
2018-02-25Rollup merge of #48166 - ↵kennytm-2/+1
hedgehog1024:hedgehog1024-stabilize-entry_and_modify, r=alexcrichton Stabilize 'entry_and_modify' feature Stabilize `entry_and_modify` feature introduced by #44734. Closes #44733
2018-02-251.25.0 -> 1.26.-Manish Goregaokar-1/+1
2018-02-24Rollup merge of #48110 - Centril:stabilize/box_leak, r=alexcrichtonManish Goregaokar-6/+1
Stabilize Box::leak Stabilizes the following: + `Box::leak` (`box_leak`, in nightly since 2017-11-23) cc #46179 r? @rust-lang/libs
2018-02-23Rollup merge of #48438 - mbrubeck:docs, r=TimNNManish Goregaokar-4/+4
[docs] Minor wording changes to drain_filter docs The docs currently say, "If the closure returns false, it will try again, and call the closure on the next element." But this happens regardless of whether the closure returns true or false.
2018-02-22Stabilize [T]::rotate_{left,right}Corey Farwell-20/+3
https://github.com/rust-lang/rust/issues/41891
2018-02-22[docs] Minor wording changes to drain_filter docsMatt Brubeck-4/+4
The docs currently say, "If the closure returns false, it will try again, and call the closure on the next element." But this happens regardless of whether the closure returns true or false.
2018-02-22Small grammar fix to docs for String::new().Anthony Deschamps-1/+1
2018-02-18Auto merge of #47687 - SimonSapin:panic-impl, r=sfacklerbors-1/+1
RFC 2070 part 1: PanicInfo and Location API changes This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html Tracking issue: https://github.com/rust-lang/rust/issues/44489 * Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`. * Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`. * Implement `Display` for `PanicInfo` and `Location`
2018-02-16Clarify contiguity of Vec's elements.Sergio Benitez-5/+5
2018-02-13Switch to retain calling drain_filter.Jacob Kiesel-21/+1
2018-02-12Stabilize 'entry_and_modify' feature for BTreeMaphedgehog1024-2/+1
2018-02-10stabilize Box::leak: remove #![feature(box_leak)] in docsMazdak Farrokhzad-4/+0
2018-02-10stabilize (version: 1.26.0) Box::leak, cc #46179Mazdak Farrokhzad-2/+1
2018-02-08Swap `ptr::read` for `ptr::drop_in_place`Jacob Kiesel-1/+1
2018-02-07Apply optimization from #44355 to retainJacob Kiesel-4/+9
2018-01-28Document that `Index` ops can panic on `HashMap` & `BTreeMap`.Corey Farwell-0/+5
Fixes https://github.com/rust-lang/rust/issues/47011.
2018-01-25Auto merge of #47006 - bitshifter:stabilize-repr-align, r=eddybbors-1/+0
Stabilized `#[repr(align(x))]` attribute (RFC 1358) Stabilzed `#[repr(align(x))]` with attr_literal syntax as proposed by @eddyb https://github.com/rust-lang/rust/issues/33626#issuecomment-348467804
2018-01-24Add missing micro version number component in stability attributes.Simon Sapin-1/+1
2018-01-24Auto merge of #47299 - cramertj:unsafe-placer, r=alexcrichtonbors-7/+7
Make core::ops::Place an unsafe trait Consumers of `Place` would reasonably expect that the `pointer` function returns a valid pointer to memory that can actually be written to.
2018-01-23Stabilized `#[repr(align(x))]` attribute (RFC 1358)Cameron Hart-1/+0
2018-01-21Rollup merge of #47632 - sdroege:exact-chunks-docs-broken-links, r=kennytmGuillaume Gomez-0/+8
Fix broken links to other slice functions in chunks/chunks_mut/exact_… …chunk/exact_chunks_mut docs See https://github.com/rust-lang/rust/pull/47126#discussion_r162780492
2018-01-21Rollup merge of #47625 - astraw:btreeset-doctest-fix, r=kennytmGuillaume Gomez-12/+12
fix doctests for BTreeSet to use BTreeSet (not BTreeMap) This fixes #47624
2018-01-21Rollup merge of #47595 - PieterPenninckx:master, r=shepmasterGuillaume Gomez-7/+8
Small improvements to the documentation of VecDeque. Some small improvements to the documentation of `VecDeque`.
2018-01-21Revert change to docs in panic section of VecDeque::split_offPieter Penninckx-1/+1
2018-01-21Fix broken links to other slice functions in ↵Sebastian Dröge-0/+8
chunks/chunks_mut/exact_chunk/exact_chunks_mut docs See https://github.com/rust-lang/rust/pull/47126#discussion_r162780492
2018-01-20fix doctests for BTreeSet to use BTreeSet (not BTreeMap)Andrew Straw-12/+12
This fixes #47624
2018-01-20Auto merge of #46980 - ↵bors-1/+1
zackmdavis:and_the_case_of_the_needlessly_parenthesized_arguments, r=petrochenkov in which the unused-parens lint comes to cover function and method args Resolves #46137.
2018-01-20Assign its own tracking issue to Box::into_raw_non_nullSimon Sapin-1/+4
https://github.com/rust-lang/rust/issues/47336
2018-01-20Revert Box::into_raw_non_null to unstableSimon Sapin-1/+1
2018-01-20Rename Box::into_non_null_raw to Box::into_raw_non_nullSimon Sapin-13/+13
2018-01-20Remove `Box::from_non_null_raw`Simon Sapin-35/+3
Per https://github.com/rust-lang/rust/pull/46952#issuecomment-353956225
2018-01-20Rename Box::*_nonnull_raw to *_non_null_rawSimon Sapin-18/+18
2018-01-20Stabilize std::ptr::NonNullSimon Sapin-9/+2
2018-01-20Mark Unique as perma-unstable, with the feature renamed to ptr_internals.Simon Sapin-1/+1
2018-01-20Replace Box::{from,into}_unique with {from,into}_nonnull_rawSimon Sapin-31/+38
Thew `_raw` prefix is included because the fact that `Box`’s ownership semantics are "dissolved" or recreated seem more important than the exact parameter type or return type.
2018-01-20Replace Unique<T> with NonZero<T> in Alloc traitSimon Sapin-11/+11
2018-01-20Rename std::ptr::Shared to NonNullSimon Sapin-43/+43
`Shared` is now a deprecated `type` alias. CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629
2018-01-19Small improvements to the documentation of VecDeque.Pieter Penninckx-7/+8
2018-01-18in which the unused-parens lint comes to cover function and method argsZack M. Davis-1/+1
Resolves #46137.
2018-01-15Reexport -> re-export in prose and documentation commentsCarol (Nichols || Goulding)-2/+2
2018-01-15Rollup merge of #47126 - sdroege:exact-chunks, r=blusskennytm-2/+134
Add slice::ExactChunks and ::ExactChunksMut iterators These guarantee that always the requested slice size will be returned and any leftoever elements at the end will be ignored. It allows llvm to get rid of bounds checks in the code using the iterator. This is inspired by the same iterators provided by ndarray. Fixes https://github.com/rust-lang/rust/issues/47115 I'll add unit tests for all this if the general idea and behaviour makes sense for everybody. Also see https://github.com/rust-lang/rust/issues/47115#issuecomment-354715511 for an example what this improves.
2018-01-13Add unit tests for exact_chunks/exact_chunks_mutSebastian Dröge-0/+57
These are basically modified copies of the chunks/chunks_mut tests.
2018-01-13Use assert_eq!() instead of assert!(a == b) in slice chunks_mut() unit testSebastian Dröge-2/+2
This way more useful information is printed if the test ever fails.
2018-01-13Mention in the exact_chunks docs that this can often be optimized better by ↵Sebastian Dröge-0/+15
the compiler And also link from the normal chunks iterator to the exact_chunks one.
2018-01-13Fix doctests for slice::exact_chunks() for realSebastian Dröge-2/+2
2018-01-13Fix assertions in examples of the exact_chunk() documentationSebastian Dröge-2/+1
2018-01-13Add #![feature(exact_chunks)] to the documentation examples to fix the doc testsSebastian Dröge-0/+4