summary refs log tree commit diff
path: root/src/liballoc
AgeCommit message (Collapse)AuthorLines
2020-03-20Remove shared root code and assertions from BTree nodesMark Rousskov-59/+8
2020-03-20Replace shared root with optional rootMark Rousskov-77/+112
This simplifies the node manipulation, as we can (in later commits) always know when traversing nodes that we are not in a shared root.
2020-03-20Make std::sync::Arc compatible with ThreadSanitizerTomasz Miąsko-4/+22
The memory fences used previously in Arc implementation are not properly understood by ThreadSanitizer as synchronization primitives. This had unfortunate effect where running any non-trivial program compiled with `-Z sanitizer=thread` would result in numerous false positives. Replace acquire fences with acquire loads when using ThreadSanitizer to address the issue.
2020-03-17Rollup merge of #70029 - jonas-schievink:bootstrap, r=CentrilMazdak Farrokhzad-24/+0
Bump the bootstrap compiler
2020-03-15Bump the bootstrap compilerJonas Schievink-24/+0
2020-03-15Rollup merge of #69661 - lopopolo:string-from-mut-str, r=sfacklerMazdak Farrokhzad-0/+11
Implement From<&mut str> for String I ran into this missing impl when trying to do `String::from` on the result returned from this API in the `uuid` crate: https://docs.rs/uuid/0.8.1/uuid/adapter/struct.Hyphenated.html#method.encode_lower I wasn't sure what to put in the stability annotation. I'd appreciate some help with that :)
2020-03-14Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddybYuki Okushi-1/+1
remove lifetimes that can be elided (clippy::needless_lifetimes)
2020-03-12remove lifetimes that can be elided (clippy::needless_lifetimes)Matthias Krüger-1/+1
2020-03-12Rollup merge of #69792 - LenaWil:try_reserve_error/impl-error, r=sfacklerMazdak Farrokhzad-0/+18
Implement Error for TryReserveError I noticed that the Error trait wasn't implemented for TryReserveError. (#48043) Not sure if the error messages and code style are 100% correct, it's my first time contributing to the Rust std.
2020-03-11Reformat match statement to make the check passLena Wildervanck-3/+1
2020-03-11Format the match statementLena Wildervanck-3/+6
2020-03-11Rollup merge of #69828 - RalfJung:vec-leak, r=kennytmMazdak Farrokhzad-4/+12
fix memory leak when vec::IntoIter panics during drop Fixes https://github.com/rust-lang/rust/issues/69770
2020-03-10Add docs for From::<&mut str>::from String implRyan Lopopolo-0/+3
2020-03-10Add stable feature nameRyan Lopopolo-1/+1
2020-03-10Allow vec.rs to be over 3000 lines :(Joshua Nelson-0/+1
2020-03-10Bump release cutoffJoshua Nelson-1/+1
2020-03-10make the impl a little prettierJoshua Nelson-1/+1
2020-03-10fix test failureJoshua Nelson-2/+7
2020-03-10limit From impl to LengthAtMost32Joshua Nelson-1/+4
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2020-03-10fix error compiling stage2Joshua Nelson-1/+1
Co-Authored-By: lzutao <taolzu@gmail.com>
2020-03-10impl From<[T; N]> for Vec<T>Joshua Nelson-0/+7
2020-03-10Rollup merge of #69877 - CAD97:patch-1, r=dtolnayMazdak Farrokhzad-1/+1
Vec::new is const stable in 1.39 not 1.32 Changelog: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1390-2019-11-07 This really surprised me when a MSRV check for 1.35 failed with `Vec::new is not yet stable as a const fn` and the docs said that it was const stabilized in 1.32.
2020-03-10Rollup merge of #69861 - Dylnuge:dylnuge/locale-doc, r=Mark-SimulacrumMazdak Farrokhzad-0/+15
Add note about localization to std::fmt docs Closes #69681
2020-03-10Rollup merge of #69799 - TimDiekmann:zst, r=AmanieuMazdak Farrokhzad-27/+47
Allow ZSTs in `AllocRef` Allows ZSTs in all `AllocRef` methods. The implementation of `AllocRef` for `Global` and `System` were adjusted to reflect those changes. This is the second item on the roadmap to support ZSTs in `AllocRef`: https://github.com/rust-lang/wg-allocators/issues/38#issuecomment-595861542 After this has landed, I will adapt `RawVec`, but since this will be a pretty big overhaul, it makes sense to do a different PR for it. ~~Requires #69794 to land first~~ r? @Amanieu
2020-03-09Vec::new is const tstable in 1.39 not 1.32Christopher Durham-1/+1
2020-03-09Add note about localization to std::fmt docsDylan Nugent-0/+15
2020-03-08Rollup merge of #69668 - ssomers:btreemap_even_more_comments, r=Mark-SimulacrumMazdak Farrokhzad-14/+19
More documentation and simplification of BTreeMap's internals Salvage the documentation and simplification from #67980, without changing the type locked down by debuginfo. r? @rkruppe
2020-03-08fix memory leak when vec::IntoIter panics during dropRalf Jung-4/+12
2020-03-08Rollup merge of #69776 - ssomers:fix69769, r=Mark-SimulacrumMazdak Farrokhzad-2/+35
Fix & test leak of some BTreeMap nodes on panic during `into_iter` Fixes #69769
2020-03-08Allow ZSTs in `AllocRef`Tim Diekmann-27/+47
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-6/+6
fix various typos
2020-03-07Rollup merge of #69765 - RalfJung:miri-test, r=LukasKalbertodtMazdak Farrokhzad-2/+2
reduce test size for Miri The larger sizes take quite a while, and there is probably little point in repeating this quite so often.
2020-03-07Implement Error for TryReserveErrorLena Wildervanck-0/+17
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-2/+2
2020-03-06fix various typosMatthias Krüger-6/+6
2020-03-06Fix & test leak of some BTreeMap nodes on panic during `into_iter`Stein Somers-2/+35
2020-03-05reduce test size for MiriRalf Jung-2/+2
2020-03-05Fixed a typoTrolledWoods-1/+1
"vector" was used instead of "string"
2020-03-04Documentation and slight simplification of BTreeMap's internalsStein Somers-14/+19
2020-03-03Rollup merge of #69650 - matthiaskrgr:clnp, r=varkorDylan DPC-1/+1
cleanup more iterator usages (and other things) * Improve weird formatting by moving comment inside else-code block. * Use .any(x) instead of .find(x).is_some() on iterators. * Use .nth(x) instead of .skip(x).next() on iterators. * Simplify conditions like x + 1 <= y to x < y * Use let instead of match to get value of enum with single variant.
2020-03-03Rollup merge of #69609 - TimDiekmann:excess, r=AmanieuYuki Okushi-22/+27
Remove `usable_size` APIs This removes the usable size APIs: - remove `usable_size` (obv) - change return type of allocating methods to include the allocated size - remove `_excess` API r? @Amanieu closes rust-lang/wg-allocators#17
2020-03-02Implement From<&mut str> for StringRyan Lopopolo-0/+8
2020-03-03Simplify conditions like x + 1 <= y to x < yMatthias Krüger-1/+1
2020-03-03Remove `usable_size` APIsTim Diekmann-22/+27
2020-03-01Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-SimulacrumDylan DPC-2/+2
simplify boolean expressions
2020-03-01Rollup merge of #69568 - JOE1994:patch-2, r=Dylan-DPCDylan DPC-2/+3
Clarify explanation of Vec<T> 'fn resize' 1. Clarified on what should implement `Clone` trait. 2. Minor grammar fix: to be able clone => to be able **to** clone
2020-02-29clarify alignment requirements in Vec::from_raw_partsRalf Jung-1/+5
2020-02-29simplify boolean expressionsMatthias Krüger-2/+2
2020-02-29Remove trailing whitespaceYoungsuk Kim-1/+1
Removed trailing whitespace which caused to fail pretty-check
2020-02-29Update src/liballoc/vec.rs Youngsuk Kim-1/+1
Following suggestion from @jonas-schievink Co-Authored-By: Jonas Schievink <jonasschievink@gmail.com>