Skip to content

Merge subtree update for toolchain nightly-2025-07-10 #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10,000 commits into
base: main
Choose a base branch
from
Open
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
1ac5cf0
Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls
yotamofek Jun 9, 2025
83b6fa5
Implement `_fmt` on `u128`
GuillaumeGomez Jun 10, 2025
5c15abc
Specialize `ToString` implementation on `u128` and `i128`
GuillaumeGomez Jun 10, 2025
ee94118
Extend num tests on `usize` and `isize` as well
GuillaumeGomez Jun 10, 2025
febe645
Rollup merge of #142125 - cberner:file_lock_stable, r=ChrisDenton
Kobzol Jun 16, 2025
ea6401f
Rollup merge of #142236 - yotamofek:pr/std/pathbuf-extend-docs, r=tgr…
Kobzol Jun 16, 2025
1befb80
Rollup merge of #142373 - m-ou-se:debug-for-location, r=tgross35
Kobzol Jun 16, 2025
60b8c70
trait_sel: `{Meta,Pointee}Sized` on `Sized` types
davidtwco Jan 16, 2025
309e197
Two changes: Have BorrowError & BorrowMutError derive Debug and add
nealsid Jun 14, 2025
d4b0526
Rename BorrowFlag type to BorrowCounter
nealsid Jun 14, 2025
8fcab76
Add support for repetition to `proc_macro::quote`
moatom May 26, 2025
9791b14
Change __rust_no_alloc_shim_is_unstable to be a function
dpaoliello May 15, 2025
3b96c9b
Rollup merge of #142562 - tgross35:update-backtrace, r=workingjubilee
Kobzol Jun 16, 2025
42b764e
library/compiler: add `PointeeSized` bounds
davidtwco Feb 10, 2025
4fddff0
lint: don't consider sizedness in upcastable lint
davidtwco Apr 9, 2025
077891e
Make performance of String::insert_str more precise
hkBst Mar 15, 2025
8029859
linked_list tests: buff check_links
hkBst Jun 16, 2025
769273d
Rollup merge of #138538 - hkBst:patch-4, r=tgross35
workingjubilee Jun 17, 2025
e76ae1c
Rollup merge of #141946 - xizheyin:141933, r=jhpratt
workingjubilee Jun 17, 2025
7e2f21a
Rollup merge of #142216 - nealsid:refcell-logging, r=tgross35
workingjubilee Jun 17, 2025
b0152aa
Remove a panicking branch in `BorrowedCursor::advance`
a1phyr Jun 17, 2025
c0dc1e7
Auto merge of #137944 - davidtwco:sized-hierarchy, r=oli-obk
bors Jun 17, 2025
ea2b915
Update libc to 0.2.174
tgross35 Jun 17, 2025
a46ec5c
Auto merge of #142613 - workingjubilee:rollup-yuod2hg, r=workingjubilee
bors Jun 17, 2025
17aeab1
Add triagebot config for subtree syncs
Kobzol Jun 16, 2025
5288121
Fix in erroneous implementation of _mm256_bsrli_epi128
satiscugcat Jun 3, 2025
137705b
Removal of redundant mod operation in _mm256_alignr_epi8
satiscugcat Jun 3, 2025
cc5fc7b
Fixing mistake in previous commit
satiscugcat Jun 3, 2025
8b5e666
Changed the implementation of bsrli to match bslli in avx2 intrinsics
satiscugcat Jun 4, 2025
a182113
Changed implementation of bsrli in avx512.rs to match that of bslli, …
satiscugcat Jun 4, 2025
49f88c3
Changed implementation of _mm{256,512}_alignr_epi8 to match that of _…
satiscugcat Jun 13, 2025
7f2c239
Moved const fn outside unsafe block
satiscugcat Jun 13, 2025
8d8a23e
Ran cargo fmt, removed unexpected character
satiscugcat Jun 13, 2025
5519048
Test
satiscugcat Jun 13, 2025
2c04b33
Rollup merge of #141574 - fee1-dead-contrib:push-owzulzmzszzx, r=jhpratt
jhpratt Jun 17, 2025
659d341
Rollup merge of #141608 - moatom:proc_macro-140238, r=dtolnay
jhpratt Jun 17, 2025
1e08d4b
Rollup merge of #142517 - ChrisDenton:anon-pipe, r=Mark-Simulacrum
jhpratt Jun 17, 2025
b14b96c
Rollup merge of #142520 - hkBst:less-static-mut, r=tgross35
jhpratt Jun 17, 2025
1bd8407
Rollup merge of #142620 - a1phyr:borrowed_buf_remove_branch, r=jhpratt
jhpratt Jun 17, 2025
cee5993
library: Increase timeout on mpmc test to reduce flakes
workingjubilee Jun 17, 2025
0e736c2
Auto merge of #130887 - Soveu:repeatn, r=scottmcm
bors Jun 18, 2025
f4324b6
add ChildExt(::send_signal)
Qelxiros Jun 18, 2025
3420c88
Allow storing `format_args!()` in `let`.
m-ou-se May 7, 2025
6786f22
Add test for new format_args!() temporary lifetimes.
m-ou-se May 7, 2025
ef4520f
Auto merge of #141061 - dpaoliello:shimasfn, r=bjorn3
bors Jun 18, 2025
ad64c52
vec_deque tests: remove static mut
hkBst Jun 18, 2025
4ce40cf
fmt tests: remove static mut
hkBst Jun 18, 2025
9cbbf8d
remove duplicate crash test
hkBst Jun 18, 2025
8189cf9
Rollup merge of #141610 - BoxyUwU:stabilize_generic_arg_infer, r=lcnr…
Kobzol Jun 18, 2025
c9d1328
Rollup merge of #142674 - hkBst:remove-duplicate-crashtest, r=bjorn3
Kobzol Jun 18, 2025
56db306
Rollup merge of #138237 - reitermarkus:remove-escape-debug-inner, r=t…
Urgau Jun 18, 2025
487e792
Rollup merge of #142674 - hkBst:remove-duplicate-crashtest, r=bjorn3
Urgau Jun 18, 2025
b4d4339
Auto merge of #142689 - Urgau:rollup-4ho6835, r=Urgau
bors Jun 18, 2025
c6dc7d3
Fix `core::iter::Fuse`'s `Default` impl to do what it's docs say it d…
zachs18 May 14, 2025
35963d9
Rollup merge of #142524 - rust-lang:cargo_update, r=Mark-Simulacrum
tgross35 Jun 19, 2025
4fae2c6
Rollup merge of #142654 - workingjubilee:increase-timeout-factor-on-m…
tgross35 Jun 19, 2025
c00c18e
Remove incorrect comments in `Weak`
theemathas Jun 19, 2025
2720033
Do not include NUL-terminator in computed length
Darksonn Jun 12, 2025
9cbf591
vec tests: remove static mut
hkBst Jun 19, 2025
7060d20
vec_deque alloctests: remove static mut
hkBst Jun 19, 2025
168159c
atomic tests: remove static mut
hkBst Jun 19, 2025
94de0a8
Auto merge of #141864 - Berrysoft:cygwin-path, r=ChrisDenton
bors Jun 19, 2025
f19304e
the `generic_arg_infer` feature is now stable on nightly
folkertdev Jun 19, 2025
2fec973
s390x: add feature detection for the z17 target features
folkertdev Jun 12, 2025
b66037a
Let String pass #[track_caller] to its Vec calls
kornelski Jun 19, 2025
2a71521
Add #[track_caller] to String methods that assert inputs
kornelski Jun 19, 2025
35ffff2
Auto merge of #140748 - m-ou-se:super-format-args3, r=jdonszelmann
bors Jun 19, 2025
8bcda27
Add methods for converting bool to `Result<(), E>`
LimpSquid Jun 19, 2025
a9855f1
Update library dependencies
tgross35 Jun 19, 2025
7813af4
Make `Clone` a `const_trait`
Daniel-Aaron-Bloom Jun 19, 2025
fedfdf4
docs(fs): Touch up grammar on lock api
epage Jun 20, 2025
08ba9c9
Auto merge of #142294 - GuillaumeGomez:specialize-tostring-on-128-int…
bors Jun 20, 2025
0816929
Merge from rustc
Jun 20, 2025
cb2ae01
Rollup merge of #141990 - Qelxiros:141975-unix_send_signal, r=ChrisDe…
tgross35 Jun 20, 2025
9f2b32b
Rollup merge of #142668 - hkBst:less-static-mut, r=tgross35
tgross35 Jun 20, 2025
5ad5d60
Rollup merge of #142753 - tgross35:library-lockfile, r=Mark-Simulacrum
tgross35 Jun 20, 2025
4ab6388
Convert `ilog(10)` to `ilog10()`
ChaiTRex Jun 20, 2025
5d665d9
Add note about `str::split` handling of no matches.
Erk- Jun 20, 2025
fcd569e
Pass -Cpanic=abort for the panic_abort crate
bjorn3 Apr 24, 2025
310b251
Add diagnostic items for Clippy
samueltardieu Jun 20, 2025
1b9e0d3
add doc(alias("AsciiChar")) to core::ascii::Char
lolbinarycat Jun 20, 2025
0307d70
Rollup merge of #142331 - deven:trim_prefix_suffix, r=Amanieu
tgross35 Jun 20, 2025
8ccec91
Rollup merge of #142764 - ChaiTRex:ilog_10_to_ilog10, r=workingjubilee
Kobzol Jun 20, 2025
2a48157
integer docs: remove extraneous text
tshepang Jun 20, 2025
6f6900e
Auto merge of #142794 - tgross35:rollup-iae7okj, r=tgross35
bors Jun 20, 2025
8daf694
Rollup merge of #142485 - mu001999-contrib:dead-code/adt-pattern, r=p…
tgross35 Jun 21, 2025
cad36ed
Rollup merge of #142756 - Daniel-Aaron-Bloom:const-clone, r=oli-obk
tgross35 Jun 21, 2025
daf8ed1
Rollup merge of #142787 - samueltardieu:diag-items-for-clippy, r=Mani…
matthiaskrgr Jun 21, 2025
d14f659
Rollup merge of #142788 - lolbinarycat:core-AsciiChar-alias, r=tgross35
matthiaskrgr Jun 21, 2025
f26d22a
Rollup merge of #140254 - bjorn3:rustc_panic_abort_abort, r=petrochenkov
jhpratt Jun 22, 2025
c620fab
Rollup merge of #142800 - tshepang:extraneous, r=Mark-Simulacrum
jhpratt Jun 22, 2025
e79e01c
Implement DesugaringKind::FormatLiteral
mejrs Jun 16, 2025
0d5e35f
Stop dbg! macro yapping about format modifiers
mejrs Jun 17, 2025
9d7e407
Rollup merge of #142594 - mejrs:new_desugaring, r=chenyukang
GuillaumeGomez Jun 22, 2025
1f8fe69
phantom_variance_markers: fix identifier usage in macro
pthariensflame Jun 22, 2025
0dbdf26
Auto merge of #142728 - kornelski:string-track, r=tgross35
bors Jun 22, 2025
39f6ede
update to literal-escaper 0.0.4 for better API without `unreachable` …
hkBst Mar 7, 2025
d488730
Make `PartialEq` a `const_trait`
oli-obk Jun 20, 2025
95a3faf
Use a NonNull pointer
Darksonn Jun 23, 2025
df4fba8
Removed `library/stdarch` submodule
Kobzol Jun 23, 2025
75af492
Import stdarch history as a Josh subtree
Kobzol Jun 23, 2025
704728d
Rollup merge of #140985 - zachs18:fuse-default-some, r=tgross35
workingjubilee Jun 23, 2025
8404bc6
Rollup merge of #141324 - Ayush1325:uefi-rand-fallback, r=joboet
workingjubilee Jun 23, 2025
17a5275
Rollup merge of #140005 - mlowicki:patch-1, r=tgross35
GuillaumeGomez Jun 24, 2025
71f93f7
Rollup merge of #142779 - Erk-:fix/core/142734, r=jhpratt
GuillaumeGomez Jun 24, 2025
56f3f9d
Rollup merge of #142894 - pthariensflame:patch-1, r=jhpratt
GuillaumeGomez Jun 24, 2025
395ae00
Remove the deprecated `concat_idents!` macro
tgross35 Jun 19, 2025
766aa60
Rollup merge of #137268 - bjoernager:c-string-eq-c-str, r=Amanieu
GuillaumeGomez Jun 24, 2025
b24d9ad
Rollup merge of #142704 - tgross35:remove-concat_idents, r=fee1-dead
GuillaumeGomez Jun 24, 2025
ac2de70
Corrected spelling mistake in c_str.rs
MetaNova Jun 24, 2025
2466d52
Avoid exporting panic_unwind as stdlib cargo feature
bjorn3 May 8, 2025
884bfed
Auto merge of #140999 - hkBst:update-escaper, r=nnethercote
bors Jun 25, 2025
b30a12d
Rollup merge of #142453 - ChrisDenton:fused, r=Amanieu
workingjubilee Jun 25, 2025
25b2208
Rollup merge of #142982 - MetaNova:patch-1, r=jhpratt
workingjubilee Jun 25, 2025
91f22c4
Auto merge of #142997 - workingjubilee:rollup-6lxec87, r=workingjubilee
bors Jun 25, 2025
ab155bf
Add Sub, Mul, Div, Rem as const_traits
SciMind2460 Jun 25, 2025
7559d68
Add `sym::macro_pin` diagnostic item for `core::pin::pin!()`
samueltardieu Jun 25, 2025
0b75ada
make `tidy-alphabetical` use a natural sort
folkertdev May 20, 2025
c5450a0
make RefCell unstably const
Daniel-Aaron-Bloom May 7, 2025
86d7052
Auto merge of #141899 - Kobzol:stdarch-josh, r=Amanieu
bors Jun 26, 2025
8ab285c
Fix RwLock::try_write documentation for WouldBlock condition
krikera Jun 26, 2025
d0835ef
Rollup merge of #141311 - folkertdev:tidy-natural-sort, r=jieyouxu
matthiaskrgr Jun 26, 2025
e8dbb81
Tracking issue number for `iter_macro`
GrigorenkoPV Jun 26, 2025
43eda97
Rollup merge of #137843 - Daniel-Aaron-Bloom:const_cell, r=oli-obk
compiler-errors Jun 27, 2025
a1a74c2
Rollup merge of #142549 - the8472:intersperse-fold-tweak, r=tgross35
compiler-errors Jun 27, 2025
5e7af6b
Rollup merge of #142700 - theemathas:remove-weak-comment, r=ibraheemdev
compiler-errors Jun 27, 2025
5215f1a
Rollup merge of #142967 - krikera:fix-rwlock-try-write-docs, r=jhpratt
compiler-errors Jun 27, 2025
3434a22
Rollup merge of #143015 - samueltardieu:pin-macro-diag-item, r=Urgau
compiler-errors Jun 27, 2025
e0d1b7e
Rollup merge of #143067 - GrigorenkoPV:142269, r=workingjubilee
compiler-errors Jun 27, 2025
795f313
Auto merge of #143074 - compiler-errors:rollup-cv64hdh, r=compiler-er…
bors Jun 27, 2025
a14206b
Insert checks for enum discriminants when debug assertions are enabled
1c3t3a May 15, 2025
264b83b
update internal `send_signal` comment
fee1-dead Jun 27, 2025
639a3dc
Update poison.rs to fix the typo (sys->sync)
SciMind2460 Jun 27, 2025
10f80b7
BTreeSet: remove duplicated code by reusing `from_sorted_iter`
xu-cheng Jun 27, 2025
6967ac3
Rollup merge of #140809 - bjorn3:panic_runtime_cleanup, r=petrochenkov
matthiaskrgr Jun 27, 2025
4e8fd88
Merge from rustc
Jun 28, 2025
081a91a
Workaround for mem safety in third party dlls
ChrisDenton Jun 27, 2025
bee72cf
Auto merge of #141759 - 1c3t3a:discriminants-query, r=saethlin
bors Jun 28, 2025
0144548
"set by Rusts options". Remove misleading always-true if cfg!(unix). …
nabijaczleweli Jun 22, 2025
9bf5f1d
Rollup merge of #123476 - devnexen:std_net_solaris_exclbind, r=Mark-S…
matthiaskrgr Jun 28, 2025
6a16077
Rollup merge of #142708 - Darksonn:location-len-without-nul, r=Mark-S…
matthiaskrgr Jun 28, 2025
38e0cb3
Rollup merge of #143082 - fee1-dead-contrib:push-qvvppzukvkxt, r=Mark…
matthiaskrgr Jun 28, 2025
ab180be
Rollup merge of #143111 - xu-cheng:btreeset_from_iter, r=Mark-Simulacrum
matthiaskrgr Jun 28, 2025
93fbfe3
Rollup merge of #142889 - nabijaczleweli:rusts, r=Mark-Simulacrum
matthiaskrgr Jun 29, 2025
9e28f11
Merge from rustc
Jun 29, 2025
ff981c2
Update README.md
kilavvy Jun 29, 2025
22f684c
Rollup merge of #142078 - sayantn:more-intrinsics, r=workingjubilee
GuillaumeGomez Jun 29, 2025
2cf1d43
Auto merge of #143137 - RalfJung:miri-sync, r=RalfJung
bors Jun 29, 2025
9ea9a3b
Merge from rustc
RalfJung Jun 29, 2025
844d523
Show auto trait and blanket impls for `!`
zachs18 Jun 29, 2025
572cb75
Stop backends from needing to support nullary intrinsics
oli-obk Jun 21, 2025
e088f73
Remove the nullary intrinsic const eval logic and treat them like oth…
oli-obk Jun 21, 2025
aacee7b
Rollup merge of #143090 - ChrisDenton:workaround1, r=tgross35
dianqk Jun 30, 2025
6a57bba
Rollup merge of #143176 - kilavvy:master, r=jieyouxu
dianqk Jun 30, 2025
7a18251
Rollup merge of #143219 - zachs18:patch-5, r=tgross35
dianqk Jun 30, 2025
2d9d0ee
Stabilize `mixed_integer_ops_unsigned_sub`
nxsaken Jun 30, 2025
3aefdd2
Auto merge of #143233 - dianqk:rollup-lcx3278, r=dianqk
bors Jun 30, 2025
16148b2
make compiler_builtins a private dependency
Qelxiros Jun 30, 2025
645c8a8
Merge from rustc
Jul 1, 2025
5c6f47c
Detect more cases of unused_parens around types
Jun 4, 2025
cf2d708
Rollup merge of #136801 - sorairolake:add-random-for-tuple, r=joshtri…
GuillaumeGomez Jul 1, 2025
2ad9b0e
Rollup merge of #141867 - Diggsey:db-improve-future-docs, r=tgross35
GuillaumeGomez Jul 1, 2025
46c01c8
Rollup merge of #142760 - epage:lock, r=tgross35
GuillaumeGomez Jul 1, 2025
cda234d
Change `{Box,Arc,Rc,Weak}::into_raw` to only work with `A = Global`
Amanieu May 18, 2025
20c9021
Update version placeholders
cuviper Jun 23, 2025
882617d
make Box::into_raw compatible with Stacked Borrows again
RalfJung May 19, 2025
c3a2379
Update `cfg(bootstrap)`
cuviper Jun 24, 2025
f9c4a23
Ignore `float_minimum_maximum` doctests on i586
cuviper Jun 28, 2025
0cedc03
Auto merge of #142974 - cuviper:stage0-bump, r=Mark-Simulacrum
bors Jul 2, 2025
9277453
Merge from rustc
Jul 2, 2025
b95020f
byte-addresses memory -> byte-addressed memory
hkBst Jul 2, 2025
7cee7f8
Remove some unsized tuple impls now that we don't support unsizing tu…
oli-obk Mar 6, 2025
c06a746
miri: improve errors for type validity assertion failures
RalfJung Jul 2, 2025
6ca1430
Rollup merge of #141847 - xizheyin:141837, r=jhpratt
matthiaskrgr Jul 2, 2025
ce9f750
Rollup merge of #142138 - ashivaram23:vec_into_chunks, r=scottmcm
matthiaskrgr Jul 2, 2025
691c144
Rollup merge of #131923 - ranger-ross:impl-copy-hash-interrorkind, r=…
matthiaskrgr Jul 2, 2025
4f32bac
Rollup merge of #138340 - oli-obk:one-size-fits-all, r=m-ou-se
matthiaskrgr Jul 2, 2025
3f8bd7d
Rollup merge of #141219 - Amanieu:leak_alloc, r=joboet
matthiaskrgr Jul 2, 2025
b94f16a
Rollup merge of #142237 - benschulz:unused-parens-fn, r=fee1-dead
matthiaskrgr Jul 2, 2025
1959337
awhile -> a while where appropriate
nabijaczleweli Jul 1, 2025
16b0f5e
Auto merge of #143338 - matthiaskrgr:rollup-ykaxh04, r=matthiaskrgr
bors Jul 2, 2025
4d66ef3
Rollup merge of #143321 - hkBst:typo-1, r=compiler-errors
matthiaskrgr Jul 3, 2025
762a6eb
Rollup merge of #143327 - RalfJung:miri-type-validity-error, r=oli-obk
matthiaskrgr Jul 3, 2025
010558d
setup CI and tidy to use typos for spellchecking and fix few typos
klensy Dec 7, 2024
3dbf315
minicore: use core's `diagnostic::on_unimplemented` messages
folkertdev Jul 2, 2025
3664be5
Merge from rustc
RalfJung Jul 3, 2025
0938132
use unsigned_abs instead of `abs` on signed int to silence clippy
hkBst Jul 3, 2025
0c41252
Link to 2024 edition page for `!` fallback changes
clubby789 Jul 3, 2025
1cc1d0d
Rollup merge of #134006 - klensy:typos, r=nnethercote
jdonszelmann Jul 3, 2025
fa70f6b
Rollup merge of #143038 - Qelxiros:142676-private-dependency-traits, …
jdonszelmann Jul 3, 2025
804d68e
Rollup merge of #143329 - folkertdev:minicore-diagnostic-on-unimpleme…
jdonszelmann Jul 3, 2025
8df7d7b
remove redundant #[must_use]
hkBst Jul 3, 2025
00a38db
simplify receivers for some array method calls
hkBst Jul 3, 2025
1da9668
Implement `int_format_into` feature
GuillaumeGomez Jun 5, 2025
874b2dc
Add test for `int_format_into` feature
GuillaumeGomez Jun 5, 2025
875c199
Use `slice_buffer_to_str` in `GenericRadix::fmt_int`
GuillaumeGomez Jun 6, 2025
fcbe668
Make __rust_alloc_error_handler_should_panic a function
dpaoliello Jul 3, 2025
4a40e52
Always use the pure Rust fallback instead of `llvm.{maximum,minimum}`
Urgau Jul 3, 2025
038c039
Remove PointerLike trait
compiler-errors Jul 3, 2025
dd043e4
Rollup merge of #142749 - LimpSquid:bool_to_result, r=scottmcm
jhpratt Jul 4, 2025
78d7fd2
Rollup merge of #143356 - hkBst:clippy-fix-2, r=scottmcm
jhpratt Jul 4, 2025
4f33267
Rollup merge of #143370 - hkBst:clippy-fix-4, r=tgross35
jhpratt Jul 4, 2025
c3f4097
Rollup merge of #143378 - hkBst:clippy-fix-6, r=tgross35
jhpratt Jul 4, 2025
caaf523
Rollup merge of #143395 - Urgau:llvm-fallback-minimum-maximum, r=tgro…
jhpratt Jul 4, 2025
e7c06e8
Merge from rustc
Jul 4, 2025
77c3aa5
clippy fix: indentation
hkBst Jul 4, 2025
67b3bce
Rollup merge of #143308 - compiler-errors:no-pointer-like, r=oli-obk
matthiaskrgr Jul 4, 2025
bbbdd07
Rollup merge of #143387 - dpaoliello:shouldpanicfn, r=bjorn3
matthiaskrgr Jul 4, 2025
5cf2b43
std: sys: net: uefi: tcp4: Implement write
Ayush1325 May 25, 2025
5c88806
Rollup merge of #141532 - Ayush1325:uefi-tcp4-send, r=tgross35
matthiaskrgr Jul 4, 2025
d3800e9
Make Rem const for floats
SciMind2460 Jun 26, 2025
860a6f9
std: sys: net: uefi: tcp4: Implement read
Ayush1325 Jul 5, 2025
7ebe19d
Rollup merge of #143040 - SciMind2460:patch-1, r=workingjubilee
workingjubilee Jul 5, 2025
1ec4032
Rollup merge of #143086 - SciMind2460:patch-2, r=workingjubilee
workingjubilee Jul 5, 2025
216fe3d
Merge from rustc
RalfJung Jul 5, 2025
59d7a6b
move the `va_copy`, `va_arg` and `va_end` to `core::intrinsics`
folkertdev Jul 4, 2025
af2315f
use `is_multiple_of` instead of manual modulo
folkertdev Jul 5, 2025
4cf3d66
use `div_ceil` instead of manual logic
folkertdev Jul 5, 2025
0f1b3a1
Rollup merge of #143445 - folkertdev:va-list-intrinsics, r=RalfJung
saethlin Jul 5, 2025
ae0f057
Rollup merge of #143478 - RalfJung:miri-sync, r=RalfJung
matthiaskrgr Jul 5, 2025
f033a22
Rollup merge of #143470 - Ayush1325:uefi-tcp4-recv, r=joshtriplett
matthiaskrgr Jul 6, 2025
c14076e
Rollup merge of #143477 - folkertdev:use-is-multiple-of, r=joshtriplett
matthiaskrgr Jul 6, 2025
8e9dda8
Renamed retain_mut to retain on LinkedList as mentioned in the ACP
pixel27 Jul 6, 2025
e4071ad
sleep_until: use clock_nanosleep where possible
dvdsk May 31, 2025
30bd486
sleep_until: add clock_nanosleep support to Miri
dvdsk Jul 3, 2025
5498d6d
Simplify num formatting helpers
yotamofek Jul 6, 2025
cb6f505
Auto merge of #141829 - dvdsk:sleep_until_linux, r=cuviper,RalfJung
bors Jul 6, 2025
6b5dfce
lib: more eagerly return `self.len()` from `ceil_char_boundary`
nagisa Jul 6, 2025
03c864d
Rollup merge of #143236 - nxsaken:mixed_integer_ops_unsigned_sub, r=i…
jhpratt Jul 7, 2025
f1da2a9
Rollup merge of #143359 - clubby789:fallback-2024-doc, r=ibraheemdev
jhpratt Jul 7, 2025
a2d96d8
Rollup merge of #143529 - pixel27:master, r=jhpratt
jhpratt Jul 7, 2025
aa1b279
Rollup merge of #143552 - nagisa:makes-ceil-char-boundary-go-zoom, r=…
jhpratt Jul 7, 2025
9e31617
Auto merge of #143556 - jhpratt:rollup-nid39y2, r=jhpratt
bors Jul 7, 2025
3e94fe8
doc(std): clarify `NonZero<T>` usage limitation in doc comment
xizheyin Jun 28, 2025
33a788c
std: fix typo in `std::path`
xizheyin Jul 7, 2025
31461bf
Rollup merge of #143130 - xizheyin:142966, r=ibraheemdev
jieyouxu Jul 7, 2025
dced84a
Rollup merge of #143563 - xizheyin:fix-typo, r=joshtriplett
jieyouxu Jul 7, 2025
ea21e9e
Rollup merge of #143340 - nabijaczleweli:awhile, r=mati865
matthiaskrgr Jul 7, 2025
402d052
Fix in String docs: remove 'else' from 'something else similar'
codexarafat Jul 7, 2025
f8f674f
Make `Default` const and add some `const Default` impls
estebank Dec 21, 2024
655ad01
Rollup merge of #142098 - GuillaumeGomez:int_format_into, r=Amanieu
matthiaskrgr Jul 8, 2025
c9401db
Rollup merge of #143608 - codexarafat:fix-string-doc, r=Noratrieb
matthiaskrgr Jul 8, 2025
839bff8
Auto merge of #143540 - yotamofek:pr/library/simplify-num-fmt, r=tgro…
bors Jul 8, 2025
b366d86
Auto merge of #134628 - estebank:const-default, r=oli-obk
bors Jul 8, 2025
d836404
Rollup merge of #143426 - hkBst:clippy-fix-indent-1, r=jhpratt
tgross35 Jul 9, 2025
2f8455a
Merge from e43d139a82620a268d3828a73e12a8679339e8f8 with conflicts
Jul 11, 2025
e7fab13
Update toolchain to 2025-07-10
Jul 11, 2025
a1f0e0d
Update Kani version to 533403efc3a2eef94e13d67f214ee25a6fb21b41
Jul 11, 2025
c72de4d
Update VeriFast proofs
Jul 11, 2025
c235c3d
Resolve conflicts
tautschnig Jul 11, 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
4 changes: 2 additions & 2 deletions library/alloc/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ pub mod __alloc_error_handler {
// This symbol is emitted by rustc next to __rust_alloc_error_handler.
// Its value depends on the -Zoom={panic,abort} compiler option.
#[rustc_std_internal_symbol]
static __rust_alloc_error_handler_should_panic: u8;
fn __rust_alloc_error_handler_should_panic_v2() -> u8;
}

if unsafe { __rust_alloc_error_handler_should_panic != 0 } {
if unsafe { __rust_alloc_error_handler_should_panic_v2() != 0 } {
panic!("memory allocation of {size} bytes failed")
} else {
core::panicking::panic_nounwind_fmt(
Expand Down
234 changes: 118 additions & 116 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ use core::error::{self, Error};
use core::fmt;
use core::future::Future;
use core::hash::{Hash, Hasher};
use core::marker::{PointerLike, Tuple, Unsize};
use core::marker::{Tuple, Unsize};
use core::mem::{self, SizedTypeProperties};
use core::ops::{
AsyncFn, AsyncFnMut, AsyncFnOnce, CoerceUnsized, Coroutine, CoroutineState, Deref, DerefMut,
Expand Down Expand Up @@ -1098,115 +1098,6 @@ impl<T: ?Sized> Box<T> {
pub unsafe fn from_non_null(ptr: NonNull<T>) -> Self {
unsafe { Self::from_raw(ptr.as_ptr()) }
}
}

impl<T: ?Sized, A: Allocator> Box<T, A> {
/// Constructs a box from a raw pointer in the given allocator.
///
/// After calling this function, the raw pointer is owned by the
/// resulting `Box`. Specifically, the `Box` destructor will call
/// the destructor of `T` and free the allocated memory. For this
/// to be safe, the memory must have been allocated in accordance
/// with the [memory layout] used by `Box` .
///
/// # Safety
///
/// This function is unsafe because improper use may lead to
/// memory problems. For example, a double-free may occur if the
/// function is called twice on the same raw pointer.
///
/// The raw pointer must point to a block of memory allocated by `alloc`.
///
/// # Examples
///
/// Recreate a `Box` which was previously converted to a raw pointer
/// using [`Box::into_raw_with_allocator`]:
/// ```
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
/// let x = Box::new_in(5, System);
/// let (ptr, alloc) = Box::into_raw_with_allocator(x);
/// let x = unsafe { Box::from_raw_in(ptr, alloc) };
/// ```
/// Manually create a `Box` from scratch by using the system allocator:
/// ```
/// #![feature(allocator_api, slice_ptr_get)]
///
/// use std::alloc::{Allocator, Layout, System};
///
/// unsafe {
/// let ptr = System.allocate(Layout::new::<i32>())?.as_mut_ptr() as *mut i32;
/// // In general .write is required to avoid attempting to destruct
/// // the (uninitialized) previous contents of `ptr`, though for this
/// // simple example `*ptr = 5` would have worked as well.
/// ptr.write(5);
/// let x = Box::from_raw_in(ptr, System);
/// }
/// # Ok::<(), std::alloc::AllocError>(())
/// ```
///
/// [memory layout]: self#memory-layout
#[unstable(feature = "allocator_api", issue = "32838")]
#[inline]
pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self {
Box(unsafe { Unique::new_unchecked(raw) }, alloc)
}

/// Constructs a box from a `NonNull` pointer in the given allocator.
///
/// After calling this function, the `NonNull` pointer is owned by
/// the resulting `Box`. Specifically, the `Box` destructor will call
/// the destructor of `T` and free the allocated memory. For this
/// to be safe, the memory must have been allocated in accordance
/// with the [memory layout] used by `Box` .
///
/// # Safety
///
/// This function is unsafe because improper use may lead to
/// memory problems. For example, a double-free may occur if the
/// function is called twice on the same raw pointer.
///
/// The non-null pointer must point to a block of memory allocated by `alloc`.
///
/// # Examples
///
/// Recreate a `Box` which was previously converted to a `NonNull` pointer
/// using [`Box::into_non_null_with_allocator`]:
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
///
/// use std::alloc::System;
///
/// let x = Box::new_in(5, System);
/// let (non_null, alloc) = Box::into_non_null_with_allocator(x);
/// let x = unsafe { Box::from_non_null_in(non_null, alloc) };
/// ```
/// Manually create a `Box` from scratch by using the system allocator:
/// ```
/// #![feature(allocator_api, box_vec_non_null, slice_ptr_get)]
///
/// use std::alloc::{Allocator, Layout, System};
///
/// unsafe {
/// let non_null = System.allocate(Layout::new::<i32>())?.cast::<i32>();
/// // In general .write is required to avoid attempting to destruct
/// // the (uninitialized) previous contents of `non_null`.
/// non_null.write(5);
/// let x = Box::from_non_null_in(non_null, System);
/// }
/// # Ok::<(), std::alloc::AllocError>(())
/// ```
///
/// [memory layout]: self#memory-layout
#[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
#[inline]
pub unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Self {
// SAFETY: guaranteed by the caller.
unsafe { Box::from_raw_in(raw.as_ptr(), alloc) }
}

/// Consumes the `Box`, returning a wrapped raw pointer.
///
Expand Down Expand Up @@ -1259,8 +1150,11 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
#[stable(feature = "box_raw", since = "1.4.0")]
#[inline]
pub fn into_raw(b: Self) -> *mut T {
// Make sure Miri realizes that we transition from a noalias pointer to a raw pointer here.
unsafe { &raw mut *&mut *Self::into_raw_with_allocator(b).0 }
// Avoid `into_raw_with_allocator` as that interacts poorly with Miri's Stacked Borrows.
let mut b = mem::ManuallyDrop::new(b);
// We go through the built-in deref for `Box`, which is crucial for Miri to recognize this
// operation for it's alias tracking.
&raw mut **b
}

/// Consumes the `Box`, returning a wrapped `NonNull` pointer.
Expand Down Expand Up @@ -1322,6 +1216,115 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
// SAFETY: `Box` is guaranteed to be non-null.
unsafe { NonNull::new_unchecked(Self::into_raw(b)) }
}
}

impl<T: ?Sized, A: Allocator> Box<T, A> {
/// Constructs a box from a raw pointer in the given allocator.
///
/// After calling this function, the raw pointer is owned by the
/// resulting `Box`. Specifically, the `Box` destructor will call
/// the destructor of `T` and free the allocated memory. For this
/// to be safe, the memory must have been allocated in accordance
/// with the [memory layout] used by `Box` .
///
/// # Safety
///
/// This function is unsafe because improper use may lead to
/// memory problems. For example, a double-free may occur if the
/// function is called twice on the same raw pointer.
///
/// The raw pointer must point to a block of memory allocated by `alloc`.
///
/// # Examples
///
/// Recreate a `Box` which was previously converted to a raw pointer
/// using [`Box::into_raw_with_allocator`]:
/// ```
/// #![feature(allocator_api)]
///
/// use std::alloc::System;
///
/// let x = Box::new_in(5, System);
/// let (ptr, alloc) = Box::into_raw_with_allocator(x);
/// let x = unsafe { Box::from_raw_in(ptr, alloc) };
/// ```
/// Manually create a `Box` from scratch by using the system allocator:
/// ```
/// #![feature(allocator_api, slice_ptr_get)]
///
/// use std::alloc::{Allocator, Layout, System};
///
/// unsafe {
/// let ptr = System.allocate(Layout::new::<i32>())?.as_mut_ptr() as *mut i32;
/// // In general .write is required to avoid attempting to destruct
/// // the (uninitialized) previous contents of `ptr`, though for this
/// // simple example `*ptr = 5` would have worked as well.
/// ptr.write(5);
/// let x = Box::from_raw_in(ptr, System);
/// }
/// # Ok::<(), std::alloc::AllocError>(())
/// ```
///
/// [memory layout]: self#memory-layout
#[unstable(feature = "allocator_api", issue = "32838")]
#[inline]
pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self {
Box(unsafe { Unique::new_unchecked(raw) }, alloc)
}

/// Constructs a box from a `NonNull` pointer in the given allocator.
///
/// After calling this function, the `NonNull` pointer is owned by
/// the resulting `Box`. Specifically, the `Box` destructor will call
/// the destructor of `T` and free the allocated memory. For this
/// to be safe, the memory must have been allocated in accordance
/// with the [memory layout] used by `Box` .
///
/// # Safety
///
/// This function is unsafe because improper use may lead to
/// memory problems. For example, a double-free may occur if the
/// function is called twice on the same raw pointer.
///
/// The non-null pointer must point to a block of memory allocated by `alloc`.
///
/// # Examples
///
/// Recreate a `Box` which was previously converted to a `NonNull` pointer
/// using [`Box::into_non_null_with_allocator`]:
/// ```
/// #![feature(allocator_api, box_vec_non_null)]
///
/// use std::alloc::System;
///
/// let x = Box::new_in(5, System);
/// let (non_null, alloc) = Box::into_non_null_with_allocator(x);
/// let x = unsafe { Box::from_non_null_in(non_null, alloc) };
/// ```
/// Manually create a `Box` from scratch by using the system allocator:
/// ```
/// #![feature(allocator_api, box_vec_non_null, slice_ptr_get)]
///
/// use std::alloc::{Allocator, Layout, System};
///
/// unsafe {
/// let non_null = System.allocate(Layout::new::<i32>())?.cast::<i32>();
/// // In general .write is required to avoid attempting to destruct
/// // the (uninitialized) previous contents of `non_null`.
/// non_null.write(5);
/// let x = Box::from_non_null_in(non_null, System);
/// }
/// # Ok::<(), std::alloc::AllocError>(())
/// ```
///
/// [memory layout]: self#memory-layout
#[unstable(feature = "allocator_api", issue = "32838")]
// #[unstable(feature = "box_vec_non_null", reason = "new API", issue = "130364")]
#[inline]
pub unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Self {
// SAFETY: guaranteed by the caller.
unsafe { Box::from_raw_in(raw.as_ptr(), alloc) }
}

/// Consumes the `Box`, returning a wrapped raw pointer and the allocator.
///
Expand Down Expand Up @@ -1602,7 +1605,9 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
where
A: 'a,
{
unsafe { &mut *Box::into_raw(b) }
let (ptr, alloc) = Box::into_raw_with_allocator(b);
mem::forget(alloc);
unsafe { &mut *ptr }
}

/// Converts a `Box<T>` into a `Pin<Box<T>>`. If `T` does not implement [`Unpin`], then
Expand Down Expand Up @@ -2127,6 +2132,3 @@ impl<E: Error> Error for Box<E> {
Error::provide(&**self, request);
}
}

#[unstable(feature = "pointer_like_trait", issue = "none")]
impl<T> PointerLike for Box<T> {}
39 changes: 2 additions & 37 deletions library/alloc/src/collections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ impl<T, A: Allocator> LinkedList<T, A> {

/// Retains only the elements specified by the predicate.
///
/// In other words, remove all elements `e` for which `f(&e)` returns false.
/// In other words, remove all elements `e` for which `f(&mut e)` returns false.
/// This method operates in place, visiting each element exactly once in the
/// original order, and preserves the order of the retained elements.
///
Expand All @@ -1047,7 +1047,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
/// d.push_front(2);
/// d.push_front(3);
///
/// d.retain(|&x| x % 2 == 0);
/// d.retain(|&mut x| x % 2 == 0);
///
/// assert_eq!(d.pop_front(), Some(2));
/// assert_eq!(d.pop_front(), None);
Expand All @@ -1074,41 +1074,6 @@ impl<T, A: Allocator> LinkedList<T, A> {
/// ```
#[unstable(feature = "linked_list_retain", issue = "114135")]
pub fn retain<F>(&mut self, mut f: F)
where
F: FnMut(&T) -> bool,
{
self.retain_mut(|elem| f(elem));
}

/// Retains only the elements specified by the predicate.
///
/// In other words, remove all elements `e` for which `f(&mut e)` returns false.
/// This method operates in place, visiting each element exactly once in the
/// original order, and preserves the order of the retained elements.
///
/// # Examples
///
/// ```
/// #![feature(linked_list_retain)]
/// use std::collections::LinkedList;
///
/// let mut d = LinkedList::new();
///
/// d.push_front(1);
/// d.push_front(2);
/// d.push_front(3);
///
/// d.retain_mut(|x| if *x % 2 == 0 {
/// *x += 1;
/// true
/// } else {
/// false
/// });
/// assert_eq!(d.pop_front(), Some(3));
/// assert_eq!(d.pop_front(), None);
/// ```
#[unstable(feature = "linked_list_retain", issue = "114135")]
pub fn retain_mut<F>(&mut self, mut f: F)
where
F: FnMut(&mut T) -> bool,
{
Expand Down
3 changes: 2 additions & 1 deletion library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@
#![feature(char_max_len)]
#![feature(clone_to_uninit)]
#![feature(coerce_unsized)]
#![feature(const_default)]
#![feature(const_eval_select)]
#![feature(const_heap)]
#![feature(const_trait_impl)]
#![feature(core_intrinsics)]
#![feature(deprecated_suggestion)]
#![feature(deref_pure_trait)]
Expand All @@ -135,7 +137,6 @@
#![feature(panic_internals)]
#![feature(pattern)]
#![feature(pin_coerce_unsized_trait)]
#![feature(pointer_like_trait)]
#![feature(ptr_alignment_type)]
#![feature(ptr_internals)]
#![feature(ptr_metadata)]
Expand Down
Loading
Loading