| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tracking issue: https://github.com/rust-lang/rust/issues/65798
This is unblocked now that `min_const_generics` has been stabilized
in https://github.com/rust-lang/rust/pull/79135.
This PR does *not* include the corresponding `IntoIterator` impl,
which is https://github.com/rust-lang/rust/pull/65819.
Instead, an iterator can be constructed through the `new` method.
`new` would become unnecessary when `IntoIterator` is implemented
and might be deprecated then, although it will stay stable.
|
|
Fix stabilization version of deque_range feature.
See https://github.com/rust-lang/rust/pull/79022#issuecomment-751315315
|
|
Add "length" as doc alias to len methods
Currently when searching for `length` there are no results: https://doc.rust-lang.org/std/?search=length. This makes `len` methods appear when searching for `length`.
|
|
Use raw version of align_of in rc data_offset
This was missed in #73845 when switching to use the raw operators.
Fixes #80365
|
|
BTreeMap: rename the area access methods
r? `@Mark-Simulacrum`
|
|
|
|
|
|
BTreeMap: test split_off (and append) more thoroughly
Using DeterministicRng as a poor man's property based testing rig.
r? ``@Mark-Simulacrum``
|
|
|
|
|
|
This was missed in #73845 when switching to use the raw operators.
Fixes #80365
|
|
|
|
BTreeMap: clean up access to MaybeUninit arrays
Stop exposing and using immutable access to `MaybeUninit` slices when we need and have exclusive access to the tree.
r? `@Mark-Simulacrum`
|
|
BTreeMap: test full nodes a little more
r? `@Mark-Simulacrum`
|
|
stabilize deque_range
Make #74217 stable, stabilizing `VecDeque::range` and `VecDeque::range_mut`.
Pr: #74099
r? `@m-ou-se`
|
|
|
|
BTreeMap: make test cases more explicit on failure
r? `@Mark-Simulacrum`
|
|
|
|
|
|
|
|
|
|
BTreeMap: relax the explicit borrow rule to make code shorter and safer
Expressions like `.reborrow_mut().into_len_mut()` are annoyingly long, and kind of dangerous for the reason `reborrow_mut()` is unsafe. By relaxing the single rule, we no longer have to make an exception for functions with a `borrow` name and functions like `as_leaf_mut`. This is largely restoring the declaration style of the btree::node API about a year ago, but with more explanation and consistency.
r? `@Mark-Simulacrum`
|
|
Stabilize or_insert_with_key
Stabilizes the `or_insert_with_key` feature from https://github.com/rust-lang/rust/issues/71024. This allows inserting key-derived values when a `HashMap`/`BTreeMap` entry is vacant.
The difference between this and `.or_insert_with(|| ... )` is that this provides a reference to the key to the closure after it is moved with `.entry(key_being_moved)`, avoiding the need to copy or clone the key.
|
|
|
|
Fix overflow when converting ZST Vec to VecDeque
```rust
let v = vec![(); 100];
let queue = VecDeque::from(v);
println!("{:?}", queue);
```
This code will currently panic with a capacity overflow.
This PR resolves this issue and makes the code run fine.
Resolves #78532
|
|
|
|
BTreeSet: simplify implementation of pop_first/pop_last
…and stop it interfering in #79245.
r? ```````@Mark-Simulacrum```````
|
|
BTreeMap: more expressive local variables in merge
r? ```````@Mark-Simulacrum```````
|
|
Do not inline finish_grow
Fixes #78471.
Looking at libgkrust.a in Firefox, the sizes for the `gkrust.*.o` file is:
- 18584816 (text) 582418 (data) with unmodified master
- 17937659 (text) 582554 (data) with #72227 reverted
- 17968228 (text) 582858 (data) with `#[inline(never)]` on `grow_amortized` and `grow_exact`, but that has some performance consequences
- 17927760 (text) 582322 (data) with this change
So in terms of size, at least in the case of Firefox, this patch more than undoes the regression. I don't think it should affect performance, but we'll see.
|
|
r=dtolnay
doc(array,vec): add notes about side effects when empty-initializing
Copying some context from a conversation in the Rust discord:
* Both `vec![T; 0]` and `[T; 0]` are syntactically valid, and produce empty containers of their respective types
* Both *also* have side effects:
```rust
fn side_effect() -> String {
println!("side effect!");
"foo".into()
}
fn main() {
println!("before!");
let x = vec![side_effect(); 0];
let y = [side_effect(); 0];
println!("{:?}, {:?}", x, y);
}
```
produces:
```
before!
side effect!
side effect!
[], []
```
This PR just adds two small notes to each's documentation, warning users that side effects can occur.
I've also submitted a clippy proposal: https://github.com/rust-lang/rust-clippy/issues/6439
|
|
|
|
BTreeMap: declare clear_parent_link directly on the root it needs
r? `@Mark-Simulacrum`
|
|
BTreeMap: detect bulk_steal's count-1 underflow in release builds too
r? `@Mark-Simulacrum`
|
|
BTreeMap: clarify comments and panics around choose_parent_kv
Fixes a lie in recent code: `unreachable!("empty non-root node")` should shout "empty internal node", but it might as well be good and keep quiet
r? `@Mark-Simulacrum`
|
|
|
|
|
|
|
|
|
|
Rollup of 12 pull requests
Successful merges:
- #79360 (std::iter: document iteration over `&T` and `&mut T`)
- #79398 (Link loop/for keyword)
- #79834 (Remove deprecated linked_list_extras methods.)
- #79845 (Fix rustup support in default_build_triple for python3)
- #79940 (fix more clippy::complexity findings)
- #79942 (Add post-init hook for static memory for miri.)
- #79954 (Fix building compiler docs with stage 0)
- #79963 (Fix typo in `DebruijnIndex` documentation)
- #79970 (Misc rustbuild improvements when the LLVM backend isn't used)
- #79973 (rustdoc light theme: Fix CSS for selected buttons)
- #79984 (Remove an unused dependency that made `rustdoc` crash)
- #79985 (Fixes submit event of the search input)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Remove deprecated linked_list_extras methods.
https://github.com/rust-lang/rust/issues/27794#issuecomment-667524201:
> I'd say give it about 2 weeks then remove them.
It's been 18 weeks. Time to remove them. :)
Closes #27794.
|
|
|
|
|
|
|