| Age | Commit message (Collapse) | Author | Lines |
|
Support custom allocators in `Box`
r? `@Amanieu`
This pull request requires a crater run.
### Prior work:
- #71873
- #58457
- [`alloc-wg`](https://github.com/TimDiekmann/alloc-wg)-crate
Currently blocked on:
- ~#77118~
- ~https://github.com/rust-lang/chalk/issues/615 (#77515)~
|
|
Add links
Fix typo
Use `sequence`
Fix typo
Fix broken link
Fix broken link
Fix broken link
Fix broken links
Fix broken links
|
|
|
|
btree: merge the implementations of MergeIter
Also remove the gratuitous Copy bounds. Same benchmark performance.
r? `@Mark-Simulacrum`
|
|
|
|
r=Mark-Simulacrum
BTreeMap: stop mistaking node::MIN_LEN for a node level constraint
Correcting #77612 that fell into the trap of assuming that node::MIN_LEN is an imposed minimum everywhere, and trying to make it much more clear it is an offered minimum at the node level.
r? @Mark-Simulacrum
|
|
replace `#[allow_internal_unstable]` with `#[rustc_allow_const_fn_unstable]` for `const fn`s
`#[allow_internal_unstable]` is currently used to side-step feature gate and stability checks.
While it was originally only meant to be used only on macros, its use was expanded to `const fn`s.
This pr adds stricter checks for the usage of `#[allow_internal_unstable]` (only on macros) and introduces the `#[rustc_allow_const_fn_unstable]` attribute for usage on `const fn`s.
This pr does not change any of the functionality associated with the use of `#[allow_internal_unstable]` on macros or the usage of `#[rustc_allow_const_fn_unstable]` (instead of `#[allow_internal_unstable]`) on `const fn`s (see https://github.com/rust-lang/rust/issues/69399#issuecomment-712911540).
Note: The check for `#[rustc_allow_const_fn_unstable]` currently only validates that the attribute is used on a function, because I don't know how I would check if the function is a `const fn` at the place of the check. I therefore openend this as a 'draft pull request'.
Closes rust-lang/rust#69399
r? @oli-obk
|
|
revise Hermit's mutex interface to support the behaviour of StaticMutex
rust-lang/rust#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the new behavior of StaticMutex, we move part of the mutex implementation into libstd.
The interface to the OS changed. Consequently, I removed a few functions, which aren't longer needed.
|
|
|
|
|
|
|
|
Clean up lib docs
Cherry-picked out of #78094.
|
|
Doc formating consistency between slice sort and sort_unstable, and big O notation consistency
Updated documentation for slice sorting methods to be consistent between stable and unstable versions, which just ended up being minor formatting differences.
I also went through and updated any doc comments with big O notation to be consistent with #74010 by italicizing them rather than having them in a code block.
|
|
|
|
|
|
|
|
BTreeMap: split off most code of remove and split_off
Putting map.rs on a diet, in addition to #77851.
r? @dtolnay
|
|
|
|
|
|
BTreeMap: test invariants more thoroughly and more readably
r? @Mark-Simulacrum
|
|
|
|
|
|
Move `slice::check_range` to `RangeBounds`
Since this method doesn't take a slice anymore (#76662), it makes more sense to define it on `RangeBounds`.
Questions:
- Should the new method be `assert_len` or `assert_length`?
|
|
|
|
BTreeMap: refactor Entry out of map.rs into its own file
btree/map.rs is approaching the 3000 line mark, splitting out the entry
code buys about 500 lines of headroom.
I've created this PR because the changes I've made in #77438 will push `map.rs` over the 3000 line limit and cause tidy to complain.
I picked `Entry` to factor out because it feels less tightly coupled to the rest of `BTreeMap` than the various iterator implementations.
Related: #60302
|
|
BTreeMap: improve gdb introspection of BTreeMap with ZST keys or values
I accidentally pushed an earlier revision in #77788: it changes the index of tuples for BTreeSet from ""[{}]".format(i) to "key{}".format(i). Which doesn't seem to make the slightest difference on my linux box nor on CI. In fact, gdb doesn't make any distinction between "key{}" and "val{}" for a BTreeMap either, leading to confusing output if you test more. But easy to improve.
r? @Mark-Simulacrum
|
|
liballoc: VecDeque: Add binary search functions
I am submitting rust-lang/rfcs#2997 as a PR as suggested by @scottmcm
I haven't yet created a tracking issue - if there's a favorable feedback I'll create one and update the issue links in the unstable attribs.
|
|
r=joshtriplett
Remove shrink_to_fit from default ToString::to_string implementation.
As suggested by `@scottmcm` on Zulip. shrink_to_fit() seems like the wrong thing to do here in most use cases of to_string(). Would be intereseting to see if it makes any difference in a timer run.
r? `@joshtriplett`
|
|
|
|
|
|
Remove deprecated unstable Vec::resize_default
It's [been deprecated](https://github.com/rust-lang/rust/pull/57656) for 15 releases.
|
|
Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
|
|
|
|
BTreeMap: make PartialCmp/PartialEq explicit and tested
Follow-up on a topic raised in #77612
r? @Mark-Simulacrum
|
|
|
|
be italicized
|
|
|
|
|
|
|
|
Use intra-doc links for links to module-level docs
r? @jyn514
|
|
BTreeMap: type-specific variants of node_as_mut and cast_unchecked
Improves debug checking and shortens some expressions. Extracted from #77408
|
|
|
|
|
|
|
|
|
|
btree/map.rs is approaching the 3000 line mark, splitting out the entry
code buys about 500 lines of headroom
|
|
|
|
|
|
fix __rust_alloc_error_handler comment
`__rust_alloc_error_handler` was added in the same `extern` block as the allocator functions, but the comment there was not actually correct for `__rust_alloc_error_handler`. So move it down to the rest of the default allocator handling with a fixed comment. At least the comment reflects my understanding of what happens, please check carefully. :)
r? @Amanieu Cc @haraldh
|
|
Link Vec leak doc to Box
|