| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
Remove in-place allocation and revert to separate methods for zeroed allocations
closes rust-lang/wg-allocators#58
|
|
Clarify reuse of a BTreeMap insert support function and treat split support likewise
r? @Mark-Simulacrum
|
|
Move bulk of BTreeMap::insert method down to new method on handle
Adjust the boundary between the map and node layers for insertion: do more in the node layer, keep root manipulation and pointer dereferencing separate. No change in undefined behaviour or performance.
r? @Mark-Simulacrum
|
|
|
|
fix typos
Fix common misspellings with https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
|
|
|
|
|
|
Make tests faster in Miri
Reduce some test iteration counts in Miri.
|
|
BTreeMap: define forget_type only when relevant
Similar to `forget_node_type` for handles.
No effect on generated code, apart maybe from the superfluous calls that might not have been optimized away.
r? @Mark-Simulacrum
|
|
r=Mark-Simulacrum
BTreeMap::drain_filter should not touch the root during iteration
Although Miri doesn't point it out, I believe there is undefined behaviour using `drain_filter` when draining the 11th-last element from a tree that was larger. When this happens, the last remaining child nodes are merged, the root becomes empty and is popped from the tree. That last step establishes a mutable reference to the node elected root and writes a pointer in `node::Root`, while iteration continues to visit the same node.
This is mostly code from #74437, slightly adapted.
|
|
BTreeMap: remove into_slices and its unsafe block
A small tweak to make BTreeMap code shorter and less unsafe.
r? @Mark-Simulacrum
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #74602 (Clarify the doc for MaybeUninit::zeroed on incorrect use)
- #74720 (Clean up E0728 explanation)
- #74992 (fix rustdoc generic param order)
- #75015 (Add Vec::spare_capacity_mut)
- #75022 (Use a slice pattern instead of rchunks_exact(_).next())
Failed merges:
r? @ghost
|
|
Stabilize Vec::leak as a method
Closes https://github.com/rust-lang/rust/issues/62195
The signature is changed to a method rather than an associated function:
```diff
-pub fn leak<'a>(vec: Vec<T>) -> &'a mut [T]
+pub fn leak<'a>(self) -> &'a mut [T]
```
The reason for `Box::leak` not to be a method (`Deref` to an arbitrary `T` which might have its own, different `leak` method) does not apply.
|
|
|
|
|
|
|
|
|
|
add `slice::array_chunks` to std
Now that #74113 has landed, these methods are suddenly usable. A rebirth of #72334
Tests are directly copied from `chunks_exact` and some additional tests for type inference.
r? @withoutboats as you are both part of t-libs and working on const generics. closes #60735
|
|
|
|
Remove `linked_list_extras` methods.
Removing these in favor of the `Cursor` API in https://github.com/rust-lang/rust/issues/58533 .
Closes #27794.
r? @Amanieu
|
|
|
|
|
|
|
|
|
|
Rename intra_doc_link_resolution_failure
It should be plural to follow the conventions in https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#lints
|
|
Don't use "weak count" around Weak::from_raw_ptr
As `Rc/Arc::weak_count` returns 0 when having no strong counts, this
could be confusing and it's better to avoid using that completely.
Closes #73840.
|
|
necessary
|
|
|
|
|
|
Remove deprecated unstable `{Box,Rc,Arc}::into_raw_non_null` functions
FCP: https://github.com/rust-lang/rust/issues/47336#issuecomment-619369613
|
|
Explain why inlining default ToString impl
Trying to remove inline attribute from default ToString impl causes regression.
Perf result at <https://github.com/rust-lang/rust/pull/74852#issuecomment-664812994>.
|
|
|
|
FCP: https://github.com/rust-lang/rust/issues/47336#issuecomment-619369613
|
|
|
|
The reason for `Box::leak` not to be a method (`Deref` to an arbitrary `T`
which might have its own, different `leak` method) does not apply.
|
|
|
|
|
|
|
|
Closes #70929.
|
|
Fix docs
|
|
This is useful for quick&dirty parsing of key: value config pairs
|
|
As `Rc/Arc::weak_count` returns 0 when having no strong counts, this
could be confusing and it's better to avoid using that completely.
Closes #73840.
|
|
|