| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
BTreeMap: document a curious assumption in test cases
r? ```@Mark-Simulacrum```
|
|
Partially fix #55002, deprecate in another release
Co-authored-by: Ashley Mannix <kodraus@hey.com>
Update stable version for stabilize_spin_loop
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Use better example for spinlock
As suggested by KodrAus
Remove renamed_spin_loop already available in master
Fix spin loop example
|
|
Move Vec UI tests to unit tests when possible
Helps with #76268.
I'm moving the tests using `Vec` or `VecDeque`.
````@rustbot```` modify labels: A-testsuite C-cleanup T-libs
|
|
fix various aliasing issues in the standard library
This fixes various cases where the standard library either used raw pointers after they were already invalidated by using the original reference again, or created raw pointers for one element of a slice and used it to access neighboring elements.
|
|
Fix doc links to std::fmt
`std::format` and `core::write` macros' docs linked to `core::fmt` for format string reference, even though only `std::fmt` has format string documentation (and the link titles were `std::fmt`)
|
|
|
|
std::format and core::write macros' docs linked to core::fmt for format string reference, even though only std::fmt has format string documentation and the link titles were std::fmt.
|
|
- BTreeMap::len
- BTreeMap::is_empty
- BTreeSet::len
- BTreeSet::is_empty
|
|
Reorder benches const variable
Move LEN so it is is read in order.
|
|
|
|
Prevent String::retain from creating non-utf8 strings when abusing panic
Fixes #78498
The idea is the same as `Vec::drain`, set the len to 0 so that nobody can observe the broken invariant if it escapes the function (in this case if `f` panics)
|
|
Explain fully qualified syntax for `Rc` and `Arc`
Also cleaned up some other small things.
@rustbot modify labels: T-doc
|
|
fix Box::into_unique
https://github.com/rust-lang/rust/pull/77187/ broke Stacked Borrows pointer tagging around `Box::into_unique` (this is caused by `Box` being a special case in the type system, which box-internal code needs to account for). This PR fixes that.
r? `@Amanieu` Cc `@TimDiekmann`
Fixes https://github.com/rust-lang/rust/issues/78419.
|
|
|
|
|
|
That recommendation was removed last year; there isn't a particular
style that is officially recommended anymore.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BTreeMap: move generic support functions out of navigate.rs
A preparatory step chipped off #78104, useful in general (if at all).
r? `@Mark-Simulacrum`
|
|
Add lexicographical comparison doc
close https://github.com/rust-lang/rust/issues/72255
|
|
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.
|
|
|
|
Check for exhaustion in RangeInclusive::contains and slicing
When a range has finished iteration, `is_empty` returns true, so it
should also be the case that `contains` returns false.
Fixes #77941.
|
|
|
|
|
|
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
|
|
|