Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
871144d
fix PartialEq const feature name and const_cmp tracking issue
RalfJung Jul 11, 2025
5af1601
fix const_ops tracking issue
RalfJung Jul 11, 2025
5ad9254
connect5: clippy fixes
hkBst Jul 11, 2025
1ec5201
random: Provide a `Distribution<T>` trait
joshtriplett Jul 9, 2025
d1cd2e5
Rollup merge of #143647 - ColtenOuO:master, r=ChrisDenton
matthiaskrgr Jul 11, 2025
c22ec30
Merge pull request #1865 from hkBst/connect5-clippy-fixes
folkertdev Jul 11, 2025
85f272a
tests: neon is arm
hkBst Jul 11, 2025
c4bc821
Merge pull request #1867 from hkBst/fix-test-neon
folkertdev Jul 11, 2025
1d8e691
slice: Mark `rotate_left`, `rotate_right` unstably const
okaneco Jul 6, 2025
542d04c
`stdarch-gen-arm`: remove `lazy_static`, use `LazyLock` instead
folkertdev Jul 11, 2025
46ae9fb
Merge pull request #1858 from folkertdev/aarch-comparison-operators
sayantn Jul 11, 2025
31761f0
Merge pull request #1868 from folkertdev/gen-arm-remove-lazy-static
folkertdev Jul 11, 2025
04c57b2
Fixed a core crate compilation failure when enabling the `optimize_fo…
nazo6 Jul 12, 2025
528e40f
Auto merge of #143766 - matthiaskrgr:rollup-0x7t69s, r=matthiaskrgr
bors Jul 12, 2025
bdbb84d
Auto merge of #143810 - matthiaskrgr:rollup-iw7a23z, r=matthiaskrgr
bors Jul 12, 2025
e6a0c8c
Add rustc-pull CI automation
Kobzol Jul 12, 2025
d387730
`aarch64`: use `f16::min` and `f16::max`
folkertdev Jul 12, 2025
560ae7b
`aarch64`: use `simd_fmin` and `simd_fmax`
folkertdev Jul 12, 2025
565397b
`arm`: use `simd_fmin` and `simd_fmax`
folkertdev Jul 12, 2025
e5b2dd7
`aarch64`: use `simd_reduce_min` and `simd_reduce_max` for floats
folkertdev Jul 12, 2025
a521960
`aarch64`: use `simd_reduce_min` and `simd_reduce_max` for integers
folkertdev Jul 12, 2025
0ba441c
`aarch64`: use `simd_reduce_add_unordered`
folkertdev Jul 12, 2025
51dd826
Add CI workflow for automatically performing subtree sync pulls
Kobzol Jul 12, 2025
f0dcb27
Tell triagebot to reopen bot PRs to run CI on them
Kobzol Jul 12, 2025
32d64af
Guarantee 8 bytes of alignment in Thread::into_raw
orlp Jul 12, 2025
7f95b95
Tidy
orlp Jul 12, 2025
fa41d66
Rollup merge of #143776 - no1wudi:fix, r=tgross35
fmease Jul 13, 2025
051445c
Rollup merge of #143803 - RalfJung:const-trait-tracking, r=compiler-e…
fmease Jul 13, 2025
61b8127
Fix typo in `std::vec`
xizheyin Jul 13, 2025
29ef5ca
`std::vec`: Upgrade `debug_assert` to UB check in `set_len`
xizheyin Jul 13, 2025
4f263c2
std::vec: Add UB check in `from_raw_parts_in`
xizheyin Jul 13, 2025
4230561
std::vec: Add UB check in `from_parts_in`
xizheyin Jul 13, 2025
0b4ce3f
Attempt to fix up SGX for random API updates
joshtriplett Jul 13, 2025
1cb2123
Use zero for initialized Once state
orlp Jul 13, 2025
1dd6426
Add comment why we use zero for COMPLETE
orlp Jul 13, 2025
775e504
make `cfg_select` a builtin macro
folkertdev Jul 4, 2025
2b38e44
Rollup merge of #143554 - okaneco:const_slice_rotate, r=Amanieu,tgross35
matthiaskrgr Jul 13, 2025
f07edf7
Rollup merge of #143774 - oli-obk:const_from, r=fee1-dead
matthiaskrgr Jul 13, 2025
dbccf3d
update issue number for `const_trait_impl`
fee1-dead Jul 13, 2025
9d16539
Auto merge of #143461 - folkertdev:cfg-select-builtin-macro, r=petroc…
bors Jul 13, 2025
463d8b8
core: make `str::split_at_unchecked()` inline
Kijewski Jul 13, 2025
53a6273
docs(alloc::fmt): Make `type` optional, instead of matching the empty…
nik-rev Jul 13, 2025
966b3b9
Merge from rustc
Jul 14, 2025
82e4fea
Change "allocated object" to "allocation".
theemathas Jul 14, 2025
9fe17f6
Rollup merge of #143875 - fee1-dead-contrib:push-zvqrmzrprpzt, r=comp…
Kobzol Jul 14, 2025
ae2c983
Rollup merge of #143881 - orlp:once-state-repr, r=tgross35
Kobzol Jul 14, 2025
51c20f8
Rollup merge of #143917 - theemathas:change-allocated-object-to-alloc…
Kobzol Jul 14, 2025
651523c
Add experimental backtrace-trace-only std feature
ChrisDenton Jul 13, 2025
ed002d7
Don't call WSACleanup on process exit
ChrisDenton May 31, 2025
f23f224
`s390x`: document the different rounding flavors
folkertdev Jul 14, 2025
ce7cb50
Rollup merge of #141809 - ChrisDenton:no-cleaup, r=jhpratt
samueltardieu Jul 14, 2025
dd56d17
Rollup merge of #143710 - joshtriplett:random-updates, r=joshtriplett
samueltardieu Jul 14, 2025
0229b44
update `cfg_select!` documentation
folkertdev Jul 14, 2025
6f910c8
Merge pull request #1852 from folkertdev/optimize-intrinsic-test
Amanieu Jul 14, 2025
f93f95d
Merge pull request #1870 from Kobzol/rustc-pull-ci
Amanieu Jul 14, 2025
66df762
Merge pull request #1871 from folkertdev/aarch64-float-min-max
Amanieu Jul 14, 2025
a4aad9f
Merge pull request #1837 from heiher/loong32
Amanieu Jul 14, 2025
3cc2afb
Merge pull request #1869 from folkertdev/s390x-use-rounding-intrinsic
Amanieu Jul 14, 2025
e9ee36a
`aarch64`: implement `vabs` using `instrinsics::simd`
folkertdev Jul 12, 2025
052d8a0
Auto merge of #142885 - a1phyr:borrowed_cursor_to_buf, r=Mark-Simulacrum
bors Jul 14, 2025
57b933b
Merge pull request #1872 from folkertdev/aarch64-horizontal-add
Amanieu Jul 15, 2025
6139672
Merge from rustc
Jul 15, 2025
e82e945
constify `SliceIndex` trait
oli-obk Jul 11, 2025
cde6468
constify some methods using `SliceIndex`
oli-obk Jul 11, 2025
ebad345
constify `Index` trait and its slice impls
oli-obk Jul 11, 2025
53f9401
Rollup merge of #143907 - Kijewski:pr-inline-split_at_unchecked, r=Ma…
samueltardieu Jul 15, 2025
a34b496
Rollup merge of #143910 - ChrisDenton:no-symbolization, r=tgross35
samueltardieu Jul 15, 2025
c9dbde9
Rollup merge of #143941 - folkertdev:cfg-select-docs, r=traviscross
samueltardieu Jul 15, 2025
0b4c8ea
make `std_detect` public dependency of `std`
mladedav Jul 12, 2025
e617915
docs: update documentation of core::mem::copy to include const on the…
SunkenPotato Jul 15, 2025
779dd67
Auto merge of #143877 - xizheyin:143813, r=scottmcm,saethlin
bors Jul 15, 2025
7ff8662
add `const_make_global`; err for `const_allocate` ptrs if didn't call
fee1-dead Jul 7, 2025
18e4395
update `Cargo.lock`
folkertdev Jul 10, 2025
376846a
`stdarch-test`: use `std::sync::LazyLock` instead of `lazy_static!`
folkertdev Jul 10, 2025
fb186b2
`stdarch-test`: misc cleanups
folkertdev Jul 10, 2025
52c495d
`stdarch-test`: error if only part of an instruction matched
folkertdev Jul 10, 2025
7ba3d65
s390x: fix tests that matched on prefix of instruction
folkertdev Jul 10, 2025
155add5
aarch64/arm: fix tests that matched on prefix of instruction
folkertdev Jul 10, 2025
921a616
`aarch64`: check for `zip1` and `zip2`
folkertdev Jul 15, 2025
2cbae9c
`aarch64`: check for `uzp1` and `uzp2`
folkertdev Jul 15, 2025
902d3e8
`aarch64`: check for `trn1` and `trn2`
folkertdev Jul 15, 2025
9ad0f6a
Add LocalKey<Cell>::update
camsteffen Jul 15, 2025
fb521eb
Update poison.rs
martinomburajr Jul 16, 2025
61ac992
Modified Typekind to group the Signed and Unsigned version of types.
madhav-madhusoodanan Jul 16, 2025
abe4348
Update SDE to v9.58.0
sayantn Jul 15, 2025
170339e
Update Docker OS to Ubuntu-25.10
sayantn Jul 15, 2025
25787c6
Bump versions in CI
sayantn Jul 15, 2025
36ce2ae
Update `wasmprinter` to latest
sayantn Jul 16, 2025
2eac49b
Merge pull request #1875 from sayantn/sde-update
Amanieu Jul 16, 2025
f7572ae
fix space in generated loongarch
folkertdev Jul 16, 2025
94d264f
Rollup merge of #143355 - hkBst:cleanup-shift-double-bitmask, r=Mark-…
samueltardieu Jul 16, 2025
145e6c8
Rollup merge of #143738 - rocurley:float_tests_refactor_2, r=tgross35
samueltardieu Jul 16, 2025
aeb6362
Rollup merge of #143921 - oli-obk:const-index, r=fee1-dead
samueltardieu Jul 16, 2025
cfebc67
Rollup merge of #143990 - camsteffen:localkey-cell, r=tgross35
samueltardieu Jul 16, 2025
11c7bd3
Implemented DerefMut for ArmIntrinsicTest
madhav-madhusoodanan Jul 16, 2025
5259985
Auto merge of #144019 - RalfJung:miri-sync, r=RalfJung
bors Jul 16, 2025
20cb253
test for the high version of a number of instructions
folkertdev Jul 17, 2025
2290ff2
`stdarch-test`: for now, allow if only part of an instruction matched
folkertdev Jul 10, 2025
cec50f1
Rollup merge of #143592 - ChrisDenton:uwp-link, r=Mark-Simulacrum
fmease Jul 17, 2025
cd62bb7
Rollup merge of #143595 - fee1-dead-contrib:push-sylpykzkmynr, r=Ralf…
fmease Jul 17, 2025
e30bab3
Rollup merge of #143820 - nazo6:fix-optimize-for-size, r=Mark-Simulacrum
fmease Jul 17, 2025
8f10413
Rollup merge of #143829 - a1phyr:trim_borrowed_buf, r=ChrisDenton
fmease Jul 17, 2025
07fb5f4
Rollup merge of #143856 - mladedav:dm/private-reexport, r=petrochenkov
fmease Jul 17, 2025
9aed31a
Rollup merge of #144002 - martinomburajr:patch-1, r=ibraheemdev
fmease Jul 17, 2025
ba0eef2
Rollup merge of #143326 - hkBst:rm-deprecated-1, r=jhpratt
matthiaskrgr Jul 17, 2025
b28864a
Rollup merge of #143631 - hkBst:update-escaper-2, r=compiler-errors
matthiaskrgr Jul 17, 2025
b776158
Allow a new lint failure in nightly
tgross35 Jul 17, 2025
4feba33
constify `Option` methods
oli-obk Jul 15, 2025
53246bd
Update the `no-merges` PR title
Kobzol Jul 17, 2025
a640415
Make `Option` `const PartialEq`
oli-obk Jul 11, 2025
d2cc0be
Make `NonZero` `const PartialEq`
oli-obk Jul 11, 2025
7794caf
Make `derive_const` usable within libcore again
oli-obk Jul 11, 2025
a6946e1
Make slices `[const] PartialEq`
oli-obk Jul 11, 2025
870a260
Rollup merge of #143967 - oli-obk:const-option-methods, r=fee1-dead
matthiaskrgr Jul 18, 2025
2d1e832
loongarch: Mark partial basic intrinsics as safe
heiher Jun 28, 2025
95d10fd
add CI action to check that generated files are correctly checked in
folkertdev Jul 16, 2025
2caa25b
pass the whole config to C compiler construction
folkertdev Jul 10, 2025
f07165d
improve cpp compiler execution
folkertdev Jul 10, 2025
044efa5
Merge pull request #1877 from folkertdev/check-stdarch-gen
folkertdev Jul 18, 2025
43967b3
Merge pull request #1861 from folkertdev/streamline-c-compilation
folkertdev Jul 18, 2025
db0173e
Merge pull request #1878 from madhav-madhusoodanan/intrinsic-test-box…
folkertdev Jul 18, 2025
6557678
exclude generated rust programs from the workspace
folkertdev Jul 10, 2025
5e00e34
`intrinsic-test`: combine C files for more efficient compilation
folkertdev Jul 10, 2025
76794e6
loongarch: Mark SIMD intrinsics without memory access as safe
heiher Jun 28, 2025
edba03d
Rollup merge of #143909 - nik-rev:patch-1, r=jhpratt
matthiaskrgr Jul 18, 2025
aa92949
Rollup merge of #143925 - oli-obk:slice-const-partialeq, r=fee1-dead
matthiaskrgr Jul 18, 2025
3712455
Merge pull request #1874 from heiher/loong-safe
folkertdev Jul 18, 2025
bd4759c
fix: don't panic on volatile access to null
LuigiPiucco Apr 20, 2025
2e8218a
Rollup merge of #143382 - fee1-dead-contrib:push-trrymlzqmmoz, r=jhpratt
matthiaskrgr Jul 18, 2025
b2ae977
mem: Use `core::ffi::c_int`
tgross35 Jul 18, 2025
a3291a5
Change the `memcmp` and `bcmp` return type to `c_int`
supersurviveur Jul 18, 2025
3e7f888
Prepare for merging from rust-lang/rust
invalid-email-address Jul 18, 2025
ad38162
Merge ref '82310651b93a' from rust-lang/rust
invalid-email-address Jul 18, 2025
7d6a2a8
clippy fix: bound in one place
hkBst Jul 2, 2025
2afada9
Merge pull request #1860 from folkertdev/stdarch-test-cleanup
Amanieu Jul 18, 2025
2b813d2
Merge pull request #1862 from folkertdev/combine-c-files
Amanieu Jul 18, 2025
24ed8a1
Rollup merge of #141076 - the8472:fix-zip-panic-safety2, r=workingjub…
matthiaskrgr Jul 19, 2025
4a74c33
interpret: fix TypeId pointers being considered data pointers
RalfJung Jul 19, 2025
3c8e89e
Auto merge of #144166 - matthiaskrgr:rollup-wccepuo, r=matthiaskrgr
bors Jul 19, 2025
44e0e8d
update `Atomic*::from_ptr` and `Atomic*::as_ptr` docs
usamoi Jul 17, 2025
d4a470e
fix load-bearing typo
lqd Jul 19, 2025
fc07035
Stabilize `const_float_round_methods`
nxsaken Jul 7, 2025
c3eedf1
Add `#[rustc_intrinsic_const_stable_indirect]` to float rounding
nxsaken Jul 7, 2025
fb9def6
Remove deprecated MaybeUninit slice methods
clarfonthey Jul 18, 2025
f4f5b85
Rollup merge of #141260 - LuigiPiucco:volatile-null, r=RalfJung
matthiaskrgr Jul 20, 2025
716cc45
Rollup merge of #143604 - nxsaken:const_float_round_methods, r=RalfJung
matthiaskrgr Jul 20, 2025
8f64817
Rollup merge of #144111 - clarfonthey:maybe-uninit-deprecated, r=jhpratt
matthiaskrgr Jul 20, 2025
a844529
Rollup merge of #144169 - RalfJung:type-id-fix, r=oli-obk
matthiaskrgr Jul 20, 2025
bac455c
Remove the ptr_unique lang item
bjorn3 Jul 20, 2025
4070d59
Rollup merge of #143282 - nxsaken:strict_sub_signed, r=jhpratt
GuillaumeGomez Jul 20, 2025
62f8613
Rollup merge of #143423 - hkBst:clippy-fix-1, r=workingjubilee
GuillaumeGomez Jul 20, 2025
363b650
flt2dec: use fill instead of loop
hkBst Jul 20, 2025
6c68f6e
Option::as_slice: fix comment
RalfJung Jul 20, 2025
a9d5359
Constify Try, From, TryFrom
Randl Jul 21, 2025
e933f51
Fix broken TLS destructors on 32-bit win7
roblabla Jul 20, 2025
c56976b
Auto merge of #144154 - tgross35:update-builtins, r=tgross35
bors Jul 21, 2025
95807b8
Rollup merge of #143768 - Randl:const-try, r=oli-obk
jieyouxu Jul 21, 2025
b2b679d
Rollup merge of #144212 - bjorn3:remove_unique_lang_item, r=oli-obk
jieyouxu Jul 21, 2025
7b03434
Auto merge of #144205 - hkBst:flt2dec, r=workingjubilee
bors Jul 22, 2025
3ed0e74
Rename `tests/codegen` into `tests/codegen-llvm`
GuillaumeGomez Jul 21, 2025
e5f01f9
Auto merge of #144222 - Kobzol:stdarch-push, r=folkertdev
bors Jul 22, 2025
ebd32cc
Move `std_detect` from `library/stdarch` to `library`
Kobzol Jul 4, 2025
27ca327
Make `std_detect` a direct dependency of `std`
Kobzol Jul 4, 2025
9291cbb
Reformat `std_detect`
Kobzol Jul 4, 2025
391483d
Update stdarch README
Kobzol Jul 4, 2025
23d629f
Move tests around to appease `tidy`
Kobzol Jul 4, 2025
cbfa36d
Fix warning
Kobzol Jul 4, 2025
e4626ee
Remove `std_detect` from stdarch examples
Kobzol Jul 13, 2025
4183f55
Remove `std_detect` from stdarch's CI
Kobzol Jul 13, 2025
b12bb26
Remove licenses from std-detect
Kobzol Jul 14, 2025
9d1558e
Improve error messages of auxv loading
Kobzol Jul 18, 2025
4701dec
Embed auxv files directly into the test binary
Kobzol Jul 18, 2025
16f86fa
Auto merge of #144249 - GuillaumeGomez:asm-tests, r=jieyouxu
bors Jul 22, 2025
56248ea
std: net: uefi: Add support to query connection data
Ayush1325 Jul 12, 2025
bd9c133
Auto merge of #143412 - Kobzol:std-detect-in-stdlib, r=Amanieu
bors Jul 23, 2025
7713fee
Hint that choose_pivot returns index in bounds
kornelski Jul 22, 2025
a941c71
Disable non_exhaustive_omitted_patterns within matches! macro
jplatte Jul 22, 2025
8ff3ac7
Add regression test for matches! + non_exhaustive_omitted_patterns lint
jplatte Jul 23, 2025
24c0319
Rollup merge of #144234 - roblabla:fix-win7-tls-dtors, r=ChrisDenton
matthiaskrgr Jul 23, 2025
8bd86f3
coretests/num: use ldexp instead of hard-coding a power of 2
RalfJung Jul 21, 2025
17bb12c
Update `dlmalloc` dependency of libstd
alexcrichton Jul 23, 2025
6179b3d
Document (internally) that `Range*<&T> as RangeBounds<T>` impls are i…
zachs18 Jul 19, 2025
734df41
add Rev::into_inner
Qelxiros Jul 22, 2025
f241071
Disable unit tests for stdlib packages that don't contain any
bjorn3 Jul 24, 2025
18ad7a0
std_detect testing improvements
bjorn3 Jul 24, 2025
ceb53ef
Rollup merge of #143838 - Ayush1325:uefi-tcp4-config-data, r=tgross35
fmease Jul 24, 2025
7c11905
Rollup merge of #144247 - RalfJung:ldexp, r=tgross35
fmease Jul 24, 2025
36fd554
Rollup merge of #144278 - Qelxiros:rev-into-inner, r=tgross35
fmease Jul 24, 2025
d62d879
library/windows_targets: Fix macro expansion error in 'link' macro
itf Jul 24, 2025
57ed6a5
Rollup merge of #143424 - hkBst:auto-deref, r=jhpratt
matthiaskrgr Jul 25, 2025
4591728
Rollup merge of #143970 - SunkenPotato:update_mem_copy_docs, r=scottmcm
matthiaskrgr Jul 25, 2025
987a142
Rollup merge of #144314 - kornelski:pivot-safely, r=jhpratt
matthiaskrgr Jul 25, 2025
73a96a2
Allow ffi_unwind_calls for `arch::wasm32::throw`
purplesyringa Jul 25, 2025
3aed15b
Remove `compiler-builtins-no-asm`
tgross35 Jul 25, 2025
a46e561
Remove `compiler-builtins-mangled-names`
tgross35 Jul 26, 2025
9ef4204
str: Mark unstable `round_char_boundary` feature functions as const
okaneco Jul 25, 2025
b671d55
Rollup merge of #144364 - alexcrichton:update-dlmalloc, r=Mark-Simula…
tgross35 Jul 26, 2025
94e12a6
Rollup merge of #143272 - tgross35:bump-fortanix, r=jhpratt,jethrogb
tgross35 Jul 26, 2025
e332572
Rollup merge of #143859 - orlp:thread-into-raw-align, r=jhpratt
tgross35 Jul 26, 2025
50b68d9
Auto merge of #144490 - tgross35:rollup-ps0utme, r=tgross35
bors Jul 26, 2025
3da3651
Rollup merge of #144331 - jplatte:matches-allow-non_exhaustive_omitte…
matthiaskrgr Jul 26, 2025
d862f57
cargo update
invalid-email-address Jul 27, 2025
2f73282
Rollup merge of #141840 - ChrisDenton:noempty, r=ChrisDenton
jhpratt Jul 27, 2025
7fac5a8
Rollup merge of #144422 - itf:itf-patch-2-1, r=ChrisDenton
jhpratt Jul 27, 2025
7276e52
constify with_exposed_provenance
RalfJung Jul 27, 2025
f2668d2
Auto merge of #144225 - purplesyringa:unwinding-intrinsics, r=nikic
bors Jul 27, 2025
f03e04d
Rollup merge of #144471 - tgross35:compiler-builtins-asm, r=Amanieu
matthiaskrgr Jul 27, 2025
c289dd0
Auto merge of #144556 - matthiaskrgr:rollup-aayo3h5, r=matthiaskrgr
bors Jul 28, 2025
da257ec
Remove `[T]::array_chunks(_mut)`
scottmcm Jul 1, 2025
372e1f8
Rollup merge of #144072 - usamoi:docs, r=Mark-Simulacrum
matthiaskrgr Jul 28, 2025
f5bbe80
Rollup merge of #144399 - bjorn3:stdlib_tests_separate_packages, r=Ma…
matthiaskrgr Jul 28, 2025
407bf08
Rollup merge of #144472 - okaneco:char_bound, r=Mark-Simulacrum
matthiaskrgr Jul 28, 2025
5735eb9
fixed typo chunks->as_chunks
xonx4l Jul 28, 2025
aabe3f3
Add `core::mem::DropGuard`
yoshuawuyts Jul 21, 2025
809d5dd
fix `Atomic*::as_ptr` wording
usamoi Jul 28, 2025
9051548
thread name in stack overflow message
joboet Jul 26, 2025
6fa579b
Auto merge of #144524 - rust-lang:cargo_update, r=clubby789
bors Jul 28, 2025
bfe154b
Auto merge of #143289 - scottmcm:remove-array-chunks, r=jhpratt
bors Jul 29, 2025
8ed1e31
Rollup merge of #144236 - yoshuawuyts:drop-guard, r=Mark-Simulacrum
Zalathar Jul 29, 2025
1275454
Rollup merge of #144539 - RalfJung:const_with_exposed_provenance, r=o…
Zalathar Jul 29, 2025
d0acc19
Rollup merge of #144575 - xonx4l:patch-6, r=scottmcm
Zalathar Jul 29, 2025
0603f87
Rollup merge of #144582 - usamoi:docs, r=RalfJung
Zalathar Jul 29, 2025
bc089b3
clean up existing poison files
connortsui20 Jul 23, 2025
42d8ab4
add `nonpoison::mutex` implementation
connortsui20 Jul 23, 2025
e2f735a
reorder mutex tests
connortsui20 Jul 23, 2025
3494607
add nonpoison and poison mutex tests
connortsui20 Jul 23, 2025
7ae281e
add extra drop, panic, and unwind tests
connortsui20 Jul 29, 2025
207afb9
Rollup merge of #144022 - connortsui20:sync_nonpoison, r=tgross35
Zalathar Jul 29, 2025
84f9da4
Rollup merge of #144167 - zachs18:rangebounds-not-unsized-reason, r=t…
Zalathar Jul 29, 2025
1124ac6
Rollup merge of #144500 - joboet:thread-name-stack-overflow, r=ChrisD…
Zalathar Jul 29, 2025
038f313
Fix typo in `DropGuard` doc
lucaswerkmeister Jul 29, 2025
83cab05
LoongArch64 LSX fast-path for `str.contains(&str)`
heiher Jun 24, 2025
bc6be7b
Rollup merge of #144634 - lucaswerkmeister:patch-1, r=lqd
Zalathar Jul 29, 2025
8690b14
Fix Ord, Eq and Hash implementation of panic::Location
orlp Jul 26, 2025
2f8dad2
Auto merge of #144393 - heiher:str-contains-lsx, r=tgross35
bors Jul 29, 2025
a003f50
Rollup merge of #144510 - orlp:fix-location-ord, r=ibraheemdev
jhpratt Jul 29, 2025
af745a4
Auto merge of #144658 - jhpratt:rollup-jdzhz27, r=jhpratt
bors Jul 29, 2025
cb5ac93
Implement push_mut
balt-dev Jun 17, 2025
f4d1221
Rollup merge of #135975 - balt-dev:master, r=tgross35
Zalathar Jul 31, 2025
6db2dc3
std_detect: Linux 6.16 support for RISC-V
a4lg Jul 31, 2025
371ea17
Make `libtest::ERROR_EXIT_CODE` const public to not redefine it in ru…
GuillaumeGomez Jul 22, 2025
feb3eae
Rollup merge of #144297 - GuillaumeGomez:ERROR_EXIT_CODE, r=Amanieu
samueltardieu Jul 31, 2025
158ca24
Rollup merge of #144721 - a4lg:riscv-hwprobe-linux-6.16, r=Amanieu
samueltardieu Jul 31, 2025
43070f3
Merge branch 'subtree/library'
Aug 2, 2025
c07cca3
Update toolchain to 2025-08-01
Aug 2, 2025
a5a67d1
Update Kani version to 53a7a3b516c5cbe504378d4a208d07d49b5aa4ec
Aug 2, 2025
92c3f66
Update VeriFast proofs
Aug 2, 2025
d98be33
Remove -Z list
tautschnig Aug 4, 2025
3c0684c
Merge branch 'main' into sync-2025-08-01
feliperodri Aug 6, 2025
51ba285
Fix log_parser bugs
tautschnig Jul 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 50 additions & 4 deletions library/alloc/src/collections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
unsafe { self.tail.as_mut().map(|node| &mut node.as_mut().element) }
}

/// Adds an element first in the list.
/// Adds an element to the front of the list.
///
/// This operation should compute in *O*(1) time.
///
Expand All @@ -844,11 +844,34 @@ impl<T, A: Allocator> LinkedList<T, A> {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn push_front(&mut self, elt: T) {
let _ = self.push_front_mut(elt);
}

/// Adds an element to the front of the list, returning a reference to it.
///
/// This operation should compute in *O*(1) time.
///
/// # Examples
///
/// ```
/// #![feature(push_mut)]
/// use std::collections::LinkedList;
///
/// let mut dl = LinkedList::from([1, 2, 3]);
///
/// let ptr = dl.push_front_mut(2);
/// *ptr += 4;
/// assert_eq!(dl.front().unwrap(), &6);
/// ```
#[unstable(feature = "push_mut", issue = "135974")]
#[must_use = "if you don't need a reference to the value, use `LinkedList::push_front` instead"]
pub fn push_front_mut(&mut self, elt: T) -> &mut T {
let node = Box::new_in(Node::new(elt), &self.alloc);
let node_ptr = NonNull::from(Box::leak(node));
let mut node_ptr = NonNull::from(Box::leak(node));
// SAFETY: node_ptr is a unique pointer to a node we boxed with self.alloc and leaked
unsafe {
self.push_front_node(node_ptr);
&mut node_ptr.as_mut().element
}
}

Expand Down Expand Up @@ -876,7 +899,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
self.pop_front_node().map(Node::into_element)
}

/// Appends an element to the back of a list.
/// Adds an element to the back of the list.
///
/// This operation should compute in *O*(1) time.
///
Expand All @@ -893,11 +916,34 @@ impl<T, A: Allocator> LinkedList<T, A> {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_confusables("push", "append")]
pub fn push_back(&mut self, elt: T) {
let _ = self.push_back_mut(elt);
}

/// Adds an element to the back of the list, returning a reference to it.
///
/// This operation should compute in *O*(1) time.
///
/// # Examples
///
/// ```
/// #![feature(push_mut)]
/// use std::collections::LinkedList;
///
/// let mut dl = LinkedList::from([1, 2, 3]);
///
/// let ptr = dl.push_back_mut(2);
/// *ptr += 4;
/// assert_eq!(dl.back().unwrap(), &6);
/// ```
#[unstable(feature = "push_mut", issue = "135974")]
#[must_use = "if you don't need a reference to the value, use `LinkedList::push_back` instead"]
pub fn push_back_mut(&mut self, elt: T) -> &mut T {
let node = Box::new_in(Node::new(elt), &self.alloc);
let node_ptr = NonNull::from(Box::leak(node));
let mut node_ptr = NonNull::from(Box::leak(node));
// SAFETY: node_ptr is a unique pointer to a node we boxed with self.alloc and leaked
unsafe {
self.push_back_node(node_ptr);
&mut node_ptr.as_mut().element
}
}

Expand Down
96 changes: 85 additions & 11 deletions library/alloc/src/collections/vec_deque/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,16 @@ impl<T, A: Allocator> VecDeque<T, A> {
unsafe { ptr::read(self.ptr().add(off)) }
}

/// Writes an element into the buffer, moving it.
/// Writes an element into the buffer, moving it and returning a pointer to it.
/// # Safety
///
/// May only be called if `off < self.capacity()`.
#[inline]
unsafe fn buffer_write(&mut self, off: usize, value: T) {
unsafe fn buffer_write(&mut self, off: usize, value: T) -> &mut T {
unsafe {
ptr::write(self.ptr().add(off), value);
let ptr = self.ptr().add(off);
ptr::write(ptr, value);
&mut *ptr
}
}

Expand Down Expand Up @@ -1891,16 +1896,34 @@ impl<T, A: Allocator> VecDeque<T, A> {
#[stable(feature = "rust1", since = "1.0.0")]
#[track_caller]
pub fn push_front(&mut self, value: T) {
let _ = self.push_front_mut(value);
}

/// Prepends an element to the deque, returning a reference to it.
///
/// # Examples
///
/// ```
/// #![feature(push_mut)]
/// use std::collections::VecDeque;
///
/// let mut d = VecDeque::from([1, 2, 3]);
/// let x = d.push_front_mut(8);
/// *x -= 1;
/// assert_eq!(d.front(), Some(&7));
/// ```
#[unstable(feature = "push_mut", issue = "135974")]
#[track_caller]
#[must_use = "if you don't need a reference to the value, use `VecDeque::push_front` instead"]
pub fn push_front_mut(&mut self, value: T) -> &mut T {
if self.is_full() {
self.grow();
}

self.head = self.wrap_sub(self.head, 1);
self.len += 1;

unsafe {
self.buffer_write(self.head, value);
}
// SAFETY: We know that self.head is within range of the deque.
unsafe { self.buffer_write(self.head, value) }
}

/// Appends an element to the back of the deque.
Expand All @@ -1919,12 +1942,33 @@ impl<T, A: Allocator> VecDeque<T, A> {
#[rustc_confusables("push", "put", "append")]
#[track_caller]
pub fn push_back(&mut self, value: T) {
let _ = self.push_back_mut(value);
}

/// Appends an element to the back of the deque, returning a reference to it.
///
/// # Examples
///
/// ```
/// #![feature(push_mut)]
/// use std::collections::VecDeque;
///
/// let mut d = VecDeque::from([1, 2, 3]);
/// let x = d.push_back_mut(9);
/// *x += 1;
/// assert_eq!(d.back(), Some(&10));
/// ```
#[unstable(feature = "push_mut", issue = "135974")]
#[track_caller]
#[must_use = "if you don't need a reference to the value, use `VecDeque::push_back` instead"]
pub fn push_back_mut(&mut self, value: T) -> &mut T {
if self.is_full() {
self.grow();
}

unsafe { self.buffer_write(self.to_physical_idx(self.len), value) }
let len = self.len;
self.len += 1;
unsafe { self.buffer_write(self.to_physical_idx(len), value) }
}

#[inline]
Expand Down Expand Up @@ -2010,7 +2054,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
///
/// # Panics
///
/// Panics if `index` is strictly greater than deque's length
/// Panics if `index` is strictly greater than the deque's length.
///
/// # Examples
///
Expand All @@ -2032,7 +2076,37 @@ impl<T, A: Allocator> VecDeque<T, A> {
#[stable(feature = "deque_extras_15", since = "1.5.0")]
#[track_caller]
pub fn insert(&mut self, index: usize, value: T) {
let _ = self.insert_mut(index, value);
}

/// Inserts an element at `index` within the deque, shifting all elements
/// with indices greater than or equal to `index` towards the back, and
/// returning a reference to it.
///
/// Element at index 0 is the front of the queue.
///
/// # Panics
///
/// Panics if `index` is strictly greater than the deque's length.
///
/// # Examples
///
/// ```
/// #![feature(push_mut)]
/// use std::collections::VecDeque;
///
/// let mut vec_deque = VecDeque::from([1, 2, 3]);
///
/// let x = vec_deque.insert_mut(1, 5);
/// *x += 7;
/// assert_eq!(vec_deque, &[1, 12, 2, 3]);
/// ```
#[unstable(feature = "push_mut", issue = "135974")]
#[track_caller]
#[must_use = "if you don't need a reference to the value, use `VecDeque::insert` instead"]
pub fn insert_mut(&mut self, index: usize, value: T) -> &mut T {
assert!(index <= self.len(), "index out of bounds");

if self.is_full() {
self.grow();
}
Expand All @@ -2045,16 +2119,16 @@ impl<T, A: Allocator> VecDeque<T, A> {
unsafe {
// see `remove()` for explanation why this wrap_copy() call is safe.
self.wrap_copy(self.to_physical_idx(index), self.to_physical_idx(index + 1), k);
self.buffer_write(self.to_physical_idx(index), value);
self.len += 1;
self.buffer_write(self.to_physical_idx(index), value)
}
} else {
let old_head = self.head;
self.head = self.wrap_sub(self.head, 1);
unsafe {
self.wrap_copy(old_head, self.head, index);
self.buffer_write(self.to_physical_idx(index), value);
self.len += 1;
self.buffer_write(self.to_physical_idx(index), value)
}
}
}
Expand Down
Loading
Loading