Matthias Krüger
f104ae4252
Rollup merge of #145113 - petrochenkov:lessfinalize, r=lcnr
...
resolve: Do not finalize shadowed bindings
I.e. do not mark them as used, or non-speculatively loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005 .
2025-09-26 18:11:08 +02:00
Vadim Petrochenkov
f89660e4aa
resolve: Do not finalize shadowed bindings
...
I.e. do not mark them as used, or non-speculative loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005 .
2025-09-25 20:36:14 +03:00
BenjaminBrienen
56734495e2
feature: Implement vec_try_remove
...
Vec::try_remove is a non-panicking version of Vec::remove
2025-09-24 15:29:09 +02:00
Sidney Cammeresi
934ee043fe
Plumb Allocator generic into std::vec::PeekMut
2025-09-18 17:29:23 -07:00
Sidney Cammeresi
ce859d7713
Switch std::vec::PeekMut::pop from self to this parameter.
...
Since PeekMut implements Deref, it shouldn't have any methods of its
own.
See also: `std::collections::binary_heap::PeekMut::pop`
2025-09-14 08:16:05 -07:00
Jacob Pratt
5b37a1e4ae
Rollup merge of #145471 - rs-sac:extr, r=the8472
...
Stabilize BTree{Map,Set}::extract_if
Tracking issue: rust-lang/rust#70530
FCP completed: https://github.com/rust-lang/rust/issues/70530#issuecomment-3191454465
Closes : rust-lang/rust#70530
2025-09-13 03:26:02 -04:00
Trevor Gross
751a9ad2e2
Rollup merge of #145756 - okaneco:stabilize_char_boundary, r=scottmcm
...
str: Stabilize `round_char_boundary` feature
Closes https://github.com/rust-lang/rust/issues/93743
FCP completed https://github.com/rust-lang/rust/issues/93743#issuecomment-3168382171
2025-08-29 19:33:03 -05:00
Sidney Cammeresi
f8a7f82bda
Stabilize BTree{Map,Set}::extract_if
2025-08-27 11:34:31 -07:00
okaneco
e42c1b1296
Stabilize round_char_boundary feature
2025-08-22 13:42:38 -04:00
ltdk
2914291e09
Move WTF-8 code from std to core/alloc
2025-08-20 20:31:33 -04:00
Guillaume Gomez
7e23144dc6
Add test for int_format_into feature
2025-07-03 18:57:16 +02:00
Trevor Gross
52758b7329
Rollup merge of #142668 - hkBst:less-static-mut, r=tgross35
...
vec_deque/fmt/vec tests: remove static mut
More rust-lang/rust#125035 .
r? ```@tgross35```
2025-06-20 02:50:39 -04:00
bors
5b74275f89
Auto merge of #142294 - GuillaumeGomez:specialize-tostring-on-128-integers, r=tgross35
...
Use a distinct `ToString` implementation for `u128` and `i128`
Part of https://github.com/rust-lang/rust/issues/135543 .
Follow-up of rust-lang/rust#136264 .
When working on https://github.com/rust-lang/rust/pull/142098 , I realized that `i128` and `u128` could also benefit from a distinct `ToString` implementation so here it.
The last commit is just me realizing that I forgot to add the format tests for `usize` and `isize`.
Here is the bench comparison:
| bench name | last nightly | with this PR | diff |
|-|-|-|-|
| bench_i128 | 29.25 ns/iter (+/- 0.66) | 17.52 ns/iter (+/- 0.7) | -40.1% |
| bench_u128 | 34.06 ns/iter (+/- 0.21) | 16.1 ns/iter (+/- 0.6) | -52.7% |
I used this code to test:
```rust
#![feature(test)]
extern crate test;
use test::{Bencher, black_box};
#[inline(always)]
fn convert_to_string<T: ToString>(n: T) -> String {
n.to_string()
}
macro_rules! decl_benches {
($($name:ident: $ty:ident,)+) => {
$(
#[bench]
fn $name(c: &mut Bencher) {
c.iter(|| convert_to_string(black_box({ let nb: $ty = 20; nb })));
}
)+
}
}
decl_benches! {
bench_u128: u128,
bench_i128: i128,
}
```
2025-06-20 02:55:43 +00:00
Marijn Schouten
456c9da45a
vec_deque alloctests: remove static mut
2025-06-19 11:51:47 +00:00
Marijn Schouten
ecdf220dbc
vec tests: remove static mut
2025-06-19 11:39:21 +00:00
Marijn Schouten
2c434edf24
remove duplicate crash test
2025-06-18 14:04:02 +00:00
Marijn Schouten
021bcb9b4c
fmt tests: remove static mut
2025-06-18 12:29:22 +00:00
Guillaume Gomez
9b09948897
Extend num tests on usize and isize as well
2025-06-16 11:54:15 +02:00
Jubilee
b38ee5e689
Rollup merge of #142046 - Qelxiros:122742-vec_peek_mut, r=cuviper
...
add Vec::peek_mut
Tracking issue: rust-lang/rust#122742
2025-06-13 20:59:16 -07:00
Matthias Krüger
315b76fcd3
Rollup merge of #138016 - nwoods-cimpress:slice_chunkby_clone, r=dtolnay
...
Added `Clone` implementation for `ChunkBy`
Added `Clone` implementation for `ChunkBy`
Closes rust-lang/rust#137969 .
2025-06-12 20:03:34 +02:00
Jeremy Smart
9d19cbe29b
update docs, test
2025-06-11 22:57:57 -04:00
Jeremy Smart
cc80429021
fix tests
2025-06-06 19:22:15 -04:00
Jeremy Smart
188c40126d
add Vec::peek_mut
2025-06-04 18:15:12 -04:00
Sidney Cammeresi
1ae96fcd79
Update tests with Range parameter to BTreeMap::extract_if etc.
2025-05-27 08:31:56 -07:00
Pietro Albini
2ce08ca5d6
update cfg(bootstrap)
2025-05-12 15:33:37 +02:00
Vladimir Krivopalov
cdf4143eb8
Implement VecDeque::truncate_front()
...
Tracking issue: #140667
Signed-off-by: Vladimir Krivopalov <vladimir.krivopalov@gmail.com>
2025-05-05 11:13:26 -04:00
bendn
c8c074288a
Suggest {to,from}_ne_bytes for transmutations between arrays and integers, etc
2025-04-24 13:14:36 +07:00
Tamir Duberstein
9058bab9a9
Move <CStr as Debug> test to coretests
2025-04-18 10:31:55 -04:00
Stuart Cook
338b8787b9
Rollup merge of #138546 - GuillaumeGomez:integer-to-string-tests, r=Amanieu
...
Add integer to string formatting tests
As discussed in https://github.com/rust-lang/rust/pull/136264 , there doesn't seem to have tests to ensure that int to string conversion is performed correctly, only sporadic tests here and there. Now we have some basic tests. :)
r? `````@Mark-Simulacrum`````
2025-04-05 13:18:14 +11:00
Frank King
5004e10ceb
Add a test for Weak created from UniqueArc::downgrade
2025-03-29 12:13:38 +08:00
Guillaume Gomez
25900c2768
Tweak integer to string conversion test a bit to be future-proof
2025-03-23 22:34:05 +01:00
Frank King
5016467a23
Implement UniqueArc
2025-03-22 15:14:49 +08:00
Guillaume Gomez
bacd57a583
Add integer to string formatting tests
2025-03-16 14:45:19 +01:00
Nathaniel Woods
8bbc080cc7
Added Clone implementation for ChunkBy
2025-03-10 11:12:26 -04:00
bjorn3
701bedc323
Move last remaining Rc test to alloctests
2025-03-07 19:11:13 +00:00
bjorn3
be1e0b786d
Move most Rc tests to alloctests
2025-03-07 19:11:13 +00:00
bjorn3
fb04372dc5
Move all alloc integration tests to a new alloctests crate
2025-03-07 19:11:11 +00:00