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
ff24035
feat: cleaned the IntrinsicType struct and associated functions.
madhav-madhusoodanan Aug 5, 2025
5fbf176
chore: moved chunk_info to `common` and code cleanup
madhav-madhusoodanan Aug 5, 2025
c579bca
Merge pull request #1895 from madhav-madhusoodanan/intrinsic-test-int…
folkertdev Aug 5, 2025
a73145d
use `IntoIterator` for the `add_flags` methods
folkertdev Aug 5, 2025
9587c7e
Ignore sleep_until test on SGX
raoulstrackx Aug 5, 2025
464dc21
Stabilize `core::iter::chain`
rossmacarthur Aug 5, 2025
98d7628
compiler-builtins: plumb LSE support for aarch64 on linux
pmur Aug 4, 2025
00a2512
Dynamically enable LSE for aarch64 rust provided intrinsics
pmur Jul 31, 2025
2ef7fac
Fix description of unsigned `checked_exact_div`
tautschnig Aug 5, 2025
687efdd
Add `u8`-as-ASCII methods to `core::ascii::Char`
ChaiTRex Jul 4, 2025
01af052
Add `std::ascii::Char` `MIN` and `MAX` constants
ChaiTRex Jul 5, 2025
c00829b
Renamed `isolate_most_least_significant_one` functions
okaneco Aug 5, 2025
7fdeeea
add code example showing that file_prefix treats dotfiles as the name…
the8472 Aug 5, 2025
1430379
configure: Use `CARGO_CFG_*_{F16,F128}` rather than invoking rustc
tgross35 Aug 5, 2025
39e1791
`File::set_times`: Remove `write(true)` from the example so it works …
joshtriplett Aug 5, 2025
3092f12
`File::set_times`: Add documentation about setting directory timestamps
joshtriplett Aug 5, 2025
aae162a
Fix some doc links for intrinsics
ehuss Aug 6, 2025
ba07f05
replace version placeholder
BoxyUwU Aug 4, 2025
6ee95c9
Rollup merge of #144836 - chotchki:patch-1, r=tgross35
Kobzol Aug 6, 2025
9593fbf
Rollup merge of #144926 - JonathanBrouwer:fix-mustuse, r=cuviper
Kobzol Aug 6, 2025
2bc6d5e
Rollup merge of #144971 - okaneco:rename_isolate_ones, r=joshtriplett
Kobzol Aug 6, 2025
4ff8a80
Rollup merge of #144978 - ehuss:intrinsic-doc-links, r=scottmcm
Kobzol Aug 6, 2025
559121a
Clarify EOF handling for `BufRead::skip_until`
ginnyTheCat Aug 6, 2025
1186a72
Change stdlib float tests to account for miri nondet floats.
LorrensP-2158466 Jul 13, 2025
9f5da6e
tidy
BoxyUwU Aug 6, 2025
faa7ded
Reword documentation for `set_times` to clarify directory handling
joshtriplett Aug 6, 2025
7a5c36a
Rollup merge of #144861 - Kivooeo:payload-as-str-stabilization, r=Chr…
GuillaumeGomez Aug 6, 2025
3660653
Rollup merge of #144972 - the8472:file-prefix-docs, r=joshtriplett
GuillaumeGomez Aug 6, 2025
fe21658
Rollup merge of #144975 - joshtriplett:file-times-dir, r=jhpratt
GuillaumeGomez Aug 6, 2025
b2b2255
Optimize `char::is_alphanumeric`
Kmeakin Aug 6, 2025
36bf865
Print thread ID in panic message if thread name is unknown
tgross35 Sep 11, 2023
860d702
Auto merge of #115746 - tgross35:unnamed-threads-panic-message, r=cuv…
bors Aug 7, 2025
2558253
Rollup merge of #138689 - jedbrown:jed/nvptx-target-feature, r=ZuseZ4
Zalathar Aug 7, 2025
97979ee
Rollup merge of #140267 - jogru0:control_flow, r=dtolnay
Zalathar Aug 7, 2025
0fe2dd8
Rollup merge of #143906 - LorrensP-2158466:miri-float-nondet-foreign-…
Zalathar Aug 7, 2025
ed1cd33
Rollup merge of #144133 - oli-obk:stabilize-const-type-id, r=lcnr
Zalathar Aug 7, 2025
a43ec7e
Rollup merge of #144682 - nxsaken:strict_overflow_ops, r=Mark-Simulacrum
Zalathar Aug 7, 2025
9224939
Auto merge of #144997 - BoxyUwU:bootstrap_bump, r=Mark-Simulacrum
bors Aug 7, 2025
4874ec9
doc(library): Fix Markdown in `Iterator::by_ref`.
Hywan Aug 7, 2025
71cf0ae
Fix doc comment of File::try_lock and File::try_lock_shared
ulrichstark Aug 7, 2025
ceef639
Auto merge of #145043 - Zalathar:rollup-3dbvdrm, r=Zalathar
bors Aug 7, 2025
c6a0d02
Clean up some resolved test regressions of const trait removals in std
ShoyuVanilla Aug 7, 2025
9e09de0
Rollup merge of #144705 - pmur:murp/aarch64-lse, r=Amanieu
tgross35 Aug 8, 2025
b6e924e
Rollup merge of #144900 - Kivooeo:unsigned_signed_diff-stabilize, r=d…
tgross35 Aug 8, 2025
65edbc5
Rollup merge of #144903 - Kivooeo:panic_handler-is-not-begin, r=m-ou-se
tgross35 Aug 8, 2025
f44acd9
Rollup merge of #144974 - tgross35:update-builtins, r=tgross35
tgross35 Aug 8, 2025
e817695
Rollup merge of #145045 - Hywan:doc-library-iterator-by_ref, r=Guilla…
tgross35 Aug 8, 2025
e3a4f68
Rollup merge of #145046 - ulrichstark:master, r=tgross35
tgross35 Aug 8, 2025
055d635
Consolidate abs tests
rocurley Jul 14, 2025
145a843
Consolidate signum tests
rocurley Jul 14, 2025
fddae8c
Consolidate is_positive tests
rocurley Jul 14, 2025
a4e4853
Consolidate is_sign_negative tests
rocurley Aug 4, 2025
f73dda0
Consolidate test_next_up
rocurley Aug 4, 2025
f5bf51f
Consolidate test_next_down
rocurley Aug 4, 2025
2f54d34
Consolidate sqrt_domain tests
rocurley Aug 4, 2025
8ff9549
Consolidate clamp tests
rocurley Aug 4, 2025
5cd1589
Consolidate total_cmp tests
rocurley Aug 4, 2025
d05c57a
Hoist zero and one out into TestableFloat
rocurley Aug 8, 2025
fc870c1
Rollup merge of #144909 - GuillaumeGomez:extend-libtest-for-merged-do…
Zalathar Aug 8, 2025
7d15d80
Rollup merge of #145042 - heiher:stdarch-push, r=folkertdev
Zalathar Aug 8, 2025
420e225
Rollup merge of #145057 - ShoyuVanilla:const-trait-tests-cleanup, r=p…
Zalathar Aug 8, 2025
a71ec16
Auto merge of #145077 - Zalathar:rollup-0k4194x, r=Zalathar
bors Aug 8, 2025
98f973a
Fix wasm target build with atomics feature
Spxg Aug 8, 2025
89362ca
Revert "Rollup merge of #143906 - LorrensP-2158466:miri-float-nondet-…
Kobzol Aug 8, 2025
3e84ba2
Rollup merge of #144192 - RalfJung:atomicrmw-ptr, r=nikic
tgross35 Aug 8, 2025
7b8e489
Auto merge of #145126 - tgross35:rollup-6w87usd, r=tgross35
bors Aug 8, 2025
b5ac431
Rollup merge of #144923 - rocurley:float_tests_refactor_3, r=tgross35
Zalathar Aug 9, 2025
36871ff
Rollup merge of #145027 - Kmeakin:km/optimize-char-is-alphanumeric, r…
Zalathar Aug 9, 2025
f82e30c
Rollup merge of #145096 - Spxg:w/wasm_atomic, r=tgross35
Zalathar Aug 9, 2025
f8272af
Merge ref '4c7749e8c8e5' from rust-lang/rust
Aug 9, 2025
c6c6866
rustc_target: Add the `32s` target feature for LoongArch
heiher Aug 8, 2025
b7af5d7
reorganize rwlock file
connortsui20 Jul 19, 2025
99139a8
add `nonpoison::rwlock` implementation
connortsui20 Jul 20, 2025
5087986
reorganize rwlock tests
connortsui20 Jul 21, 2025
88e5129
add nonpoison and poison rwlock tests
connortsui20 Jul 29, 2025
d451ec1
Replace unsafe function with safe alternative
ChrisDenton Aug 9, 2025
e06e0ed
Stabilize feature
Kivooeo Aug 8, 2025
29c83f4
`{BTree,Hash}Map`: add "`Entry` API" section heading
ada4a Aug 9, 2025
0cf20bd
`HashMap`: also add "Usage with custom key types" heading
ada4a Aug 9, 2025
52751e9
Avoid abbreviating "numerator" as "numer", to allow catching typo "nu…
joshtriplett Aug 9, 2025
1e5ba4d
cargo update
invalid-email-address Aug 10, 2025
b61bc0d
Let forward_ref_* macros accept multiple attributes, and require attr…
clarfonthey Jul 14, 2025
5235f7a
Constify remaining operators
clarfonthey Jul 15, 2025
e6bca6d
Rollup merge of #145135 - Kivooeo:stabilize-duration_constructors_lit…
Zalathar Aug 10, 2025
7029f55
Rollup merge of #145162 - ada4a:hash_and_btree_map-add-entry-section,…
Zalathar Aug 10, 2025
59ee82e
Rollup merge of #145150 - ChrisDenton:inherit, r=Mark-Simulacrum
jhpratt Aug 10, 2025
44db1e4
Remove unnecessary parentheses in `assert!`s
estebank Aug 10, 2025
d88aefd
mention `Hash` and `Ord`; refine description of `derive`
gewitternacht Aug 10, 2025
9e39c75
cfg_select: Support unbraced expressions
joshtriplett Aug 10, 2025
f2e76f8
Rollup merge of #143949 - clarfonthey:const-arith-ops, r=Amanieu
Zalathar Aug 11, 2025
1f8bb9f
Rollup merge of #144330 - gewitternacht:document-clone-eq, r=Amanieu
Zalathar Aug 11, 2025
893580e
Rollup merge of #144350 - Ayush1325:uefi-io, r=tgross35,nicholasbishop
Zalathar Aug 11, 2025
bfb736f
Rollup merge of #145228 - estebank:unnecessary-parens, r=joshtriplett
Zalathar Aug 11, 2025
2bf3644
std: sys: pal: uefi: Overhaul Time
Ayush1325 Apr 14, 2025
e6fd5d5
std: sys: pal: uefi: tests: Add systemtime tests
Ayush1325 May 24, 2025
309d9ba
dec2flt: Provide more valid inputs examples
jstasiak Aug 11, 2025
a70d7ec
Make a James Bond reference
jstasiak Aug 11, 2025
ad58f8c
Make explicit guarantees about `Vec`’s allocator
SabrinaJewson Aug 11, 2025
6a1fb51
Respond to review comments
SabrinaJewson Aug 11, 2025
b309211
Deprecate RUST_TEST_* env variables
epage Aug 11, 2025
5b128ea
Handle the `capacity == 0` case
SabrinaJewson Aug 12, 2025
70be52f
fix typo
ada4a Aug 12, 2025
c598835
Rollup merge of #145260 - SabrinaJewson:vec-allocator-docs, r=dtolnay
Zalathar Aug 12, 2025
aad53ec
Rollup merge of #145292 - ada4a:patch-2, r=tgross35
Zalathar Aug 12, 2025
23a3069
Link to payload_as_str() from payload().
m-ou-se Aug 12, 2025
c686675
Revert "Partially outline code inside the panic! macro".
m-ou-se Aug 12, 2025
371e15a
Address dangling doc
giltho Aug 12, 2025
65c3a65
Constify SystemTime methods
clarfonthey Jul 26, 2025
5e3267b
Add cast_init and cast_uninit methods for pointers
clarfonthey Jul 18, 2025
d6e4502
Make std use the edition 2024 prelude
theemathas Aug 13, 2025
ff12cbd
Rollup merge of #143467 - ChaiTRex:ascii_char_is_ascii, r=tgross35
Kobzol Aug 13, 2025
fbb69dd
Rollup merge of #144519 - clarfonthey:const-system-time, r=jhpratt
Kobzol Aug 13, 2025
4a80774
Rollup merge of #144870 - Kivooeo:file_prefix-stabilize, r=tgross35
Kobzol Aug 13, 2025
fc2441d
Rollup merge of #145269 - epage:test-env, r=jhpratt
Kobzol Aug 13, 2025
98082b1
Rollup merge of #145303 - m-ou-se:payload-as-str-doc, r=jhpratt
Kobzol Aug 13, 2025
940d054
Rollup merge of #145308 - giltho:dangling-doc, r=scottmcm
Kobzol Aug 13, 2025
f016862
Rollup merge of #145325 - clarfonthey:cast-init, r=scottmcm
Kobzol Aug 13, 2025
8f49327
Merge ref '1553adfe6884' from rust-lang/rust
Aug 13, 2025
4b6317c
doc test: fix mpsc.rs try_send doc test
eval-exec Aug 12, 2025
ede1562
Hide docs for core::unicode
clarfonthey Aug 13, 2025
f312a5a
Stabilize `sse4a` and `tbm` target features
sayantn Jul 27, 2025
0d10217
Rollup merge of #142741 - a1phyr:fix_unsoundness, r=Mark-Simulacrum
GuillaumeGomez Aug 14, 2025
65e9230
Rollup merge of #144515 - scottmcm:ptr_cast_array, r=Mark-Simulacrum
GuillaumeGomez Aug 14, 2025
cbd4630
Rollup merge of #145179 - joshtriplett:number, r=RalfJung
GuillaumeGomez Aug 14, 2025
f85a5f6
Rollup merge of #145299 - eval-exec:exec-fix-145293, r=tgross35
GuillaumeGomez Aug 14, 2025
f2d2871
Print regions in `type_name`.
nnethercote Aug 7, 2025
03dba69
resolve prelude import at `build_reduced_graph` phase
LorrensP-2158466 Aug 11, 2025
ecfc84d
Auto merge of #144542 - sayantn:stabilize-sse4a-tbm, r=Amanieu,travis…
bors Aug 14, 2025
0ecb1f5
Basic implementation of `autodiff` intrinsic
Sa4dUs Aug 14, 2025
86c250f
Complete functionality and general cleanup
Sa4dUs Aug 14, 2025
d529925
std: thread: Return error if setting thread stack size fails
Gelbpunkt Jul 20, 2025
7de45d7
Rollup merge of #145233 - joshtriplett:cfg-select-expr, r=jieyouxu
Kobzol Aug 14, 2025
ca22abc
Windows: Replace `GetThreadId`+`GetCurrentThread` with `GetCurrentThr…
tgross35 Aug 15, 2025
b8efab7
std_detect: RISC-V platform guide documentation
a4lg Aug 15, 2025
65f9cb5
Merge ref '3507a749b365' from rust-lang/rust
Aug 15, 2025
f753cd4
Rollup merge of #118087 - GrigorenkoPV:refcell_try_map, r=Mark-Simula…
Zalathar Aug 15, 2025
cf19f90
Rollup merge of #142640 - Sa4dUs:ad-intrinsic, r=ZuseZ4
Zalathar Aug 15, 2025
080e89d
Rollup merge of #144947 - tautschnig:remove-stray-checked_div-comment…
Zalathar Aug 15, 2025
1b3a70c
Rollup merge of #145189 - rust-lang:cargo_update, r=clubby789
Zalathar Aug 15, 2025
c9c0006
Rollup merge of #145322 - LorrensP-2158466:early-prelude-processing, …
Zalathar Aug 15, 2025
affd708
Rollup merge of #145331 - theemathas:std-prelude-2024, r=tgross35
Zalathar Aug 15, 2025
a953cc8
Create unstable `From` builtin macro and register it
Kobzol Aug 4, 2025
3504bd9
Rollup merge of #144210 - Gelbpunkt:thread-stack-size-musl, r=jhpratt
Kobzol Aug 15, 2025
48e13b7
Rollup merge of #145412 - tgross35:win-tid, r=ChrisDenton
Kobzol Aug 15, 2025
3f0e8f7
stabilize const exposed provenance
Kivooeo Aug 15, 2025
f87b014
stabilize const pathbuf osstring new
Kivooeo Aug 15, 2025
d82cde3
Rollup merge of #143717 - Jules-Bertholet:pin-default, r=dtolnay
jhpratt Aug 15, 2025
57454b2
Rollup merge of #144054 - jsimmons:stabilize-as-array-of-cells, r=tgr…
jhpratt Aug 15, 2025
5efcc19
Rollup merge of #144922 - Kobzol:derive-from, r=nnethercote
jhpratt Aug 15, 2025
2567930
Rollup merge of #144963 - rossmacarthur-forks:stabilize-core-iter-cha…
jhpratt Aug 15, 2025
b6249f1
Rollup merge of #145462 - Kivooeo:stabilize-const_exposed_provenance,…
jhpratt Aug 15, 2025
0eba590
Fix typo in doc for library/std/src/fs.rs#set_permissions
alurm Aug 15, 2025
72c7f4c
Auto merge of #145304 - m-ou-se:simplify-panic, r=oli-obk
bors Aug 16, 2025
41fb7d1
library: Migrate from `cfg_if` to `cfg_select`
joshtriplett Aug 10, 2025
fba1c47
run spellcheck as a tidy extra check in ci
lolbinarycat Aug 6, 2025
6eba91d
fmt::DisplayInt abstraction obsolete with better macro
pascaldekloe Jul 10, 2025
5c1d29a
tidy now installs typos-cli as-needed via cargo
lolbinarycat Aug 8, 2025
4f7261a
std: fix more typos
lolbinarycat Aug 16, 2025
ca4ba73
Indent some code inside `cfg_select!`
joshtriplett Aug 16, 2025
6e032f4
Optimize `char::encode_utf8`
Kmeakin Aug 16, 2025
90ada38
Auto merge of #144081 - RalfJung:const-ptr-fragments, r=oli-obk
bors Aug 17, 2025
772683c
Rust build fails on OpenBSD after using file_lock feature
semarie Aug 16, 2025
6b7066b
stdlib: Replace typedef -> type alias in doc comment
typesanitizer Aug 17, 2025
85cbfac
Auto merge of #145284 - nnethercote:type_name-print-regions, r=lcnr
bors Aug 17, 2025
e4f579f
Add runtime detection for APX-F and AVX10
sayantn Aug 17, 2025
7941af7
bufreader::Buffer::backshift: don't move the uninit bytes
lolbinarycat Aug 17, 2025
cc5846f
Merge ref '425a9c0a0e36' from rust-lang/rust
Aug 18, 2025
e2f76e4
Rollup merge of #145476 - alurm:patch-1, r=ibraheemdev
Zalathar Aug 18, 2025
162cb1d
Implement feature `int_lowest_highest_one` for integer and NonZero types
Gnurou Aug 10, 2025
fd2ef7d
Remove the `From` derive macro from prelude
Kobzol Aug 18, 2025
2665393
cargo update
invalid-email-address Aug 17, 2025
af26dd4
implement std::fs::set_permissions_nofollow on unix
lolbinarycat Jun 24, 2025
b4e28fd
Auto merge of #145489 - joshtriplett:cfg-if-not, r=Amanieu
bors Aug 18, 2025
d103ec3
std_detect: RISC-V: implement implication to "C"
a4lg Aug 19, 2025
fef6ad5
Rollup merge of #140956 - Kixunil:impl-partialeq-str-for-path, r=Amanieu
Zalathar Aug 19, 2025
1551672
Rollup merge of #141744 - GrigorenkoPV:ip_from, r=Amanieu
Zalathar Aug 19, 2025
c53d850
Rollup merge of #142871 - chenyukang:yukang-fix-doc-for-transpose, r=…
Zalathar Aug 19, 2025
1ee60af
Rollup merge of #144960 - raoulstrackx:raoul/rte-513-disable_sleep_te…
Zalathar Aug 19, 2025
870e8a0
Rollup merge of #145563 - Kobzol:remove-from-from-prelude, r=petroche…
Zalathar Aug 19, 2025
2cad529
UnsafePinned::raw_get: sync signature with get
RalfJung Aug 19, 2025
1535c72
Remove hs_abs_cmp examples
miried Aug 19, 2025
001ff20
Merge remote-tracking branch 'upstream/master'
miried Aug 19, 2025
66e1c11
Rollup merge of #142938 - lolbinarycat:std-set_permissions_nofollow, …
jieyouxu Aug 19, 2025
053aff3
Rollup merge of #143730 - pascaldekloe:fmt-radix-trim, r=tgross35
jieyouxu Aug 19, 2025
663bbcc
Rollup merge of #144767 - tgross35:doc-grammar, r=ibraheemdev
jieyouxu Aug 19, 2025
b682e04
Rollup merge of #145025 - lolbinarycat:ci-tidy-spellcheck, r=Kobzol
jieyouxu Aug 19, 2025
c932034
Rollup merge of #145099 - heiher:loong-32s, r=folkertdev
jieyouxu Aug 19, 2025
fd0c5f5
Rollup merge of #145255 - lune-climate:dec2flt-doc, r=ibraheemdev
jieyouxu Aug 19, 2025
2c0774f
Rollup merge of #145336 - clarfonthey:hidden-unicode, r=ibraheemdev
jieyouxu Aug 19, 2025
262db59
Rollup merge of #145464 - Kivooeo:stabilize-const_pathbuf_osstring_ne…
jieyouxu Aug 19, 2025
6ebc8a8
Rollup merge of #145511 - semarie:push-rnytptsoxrxn, r=joshtriplett
jieyouxu Aug 19, 2025
f802233
Rollup merge of #145538 - lolbinarycat:std-bufreader-buffer-backshift…
jieyouxu Aug 19, 2025
8c82467
`std_detect`: Use `rustc-std-workspace-*` to pull in `compiler-builtins`
joshtriplett Aug 19, 2025
33d01ad
Update lockfile for changes to `std_detect`
joshtriplett Aug 19, 2025
6de3003
Remove the std workspace patch for `compiler-builtins`
tgross35 Aug 19, 2025
6dde419
add a fallback implementation for the `prefetch_*` intrinsics
folkertdev Aug 19, 2025
71d8d81
Auto merge of #145600 - jieyouxu:rollup-jw0bpnt, r=jieyouxu
bors Aug 19, 2025
a202162
Fix typos in LocalKey documentation
qxzcode Aug 19, 2025
da4a70c
Adjust wording for conciseness
qxzcode Aug 19, 2025
0a6b3f6
make `prefetch` intrinsics safe
folkertdev Aug 19, 2025
1e19dbc
Tweak wording again
qxzcode Aug 19, 2025
ede2f42
Auto merge of #145601 - jieyouxu:rollup-t5mbqhc, r=jieyouxu
bors Aug 19, 2025
bd69f8d
Rollup merge of #139357 - miried:master, r=Amanieu
jhpratt Aug 20, 2025
43b02cb
Rollup merge of #145006 - ginnyTheCat:docs-skip-until, r=ibraheemdev
jhpratt Aug 20, 2025
bbaa398
Rollup merge of #145381 - Gnurou:int_lowest_highest_one, r=jhpratt
jhpratt Aug 20, 2025
858c223
Rollup merge of #145417 - a4lg:riscv-arch-platform-guide-ch2, r=Amanieu
jhpratt Aug 20, 2025
582333a
Rollup merge of #145531 - sayantn:detect-apxf-avx10, r=Amanieu
jhpratt Aug 20, 2025
55c9d8f
Rollup merge of #145619 - joshtriplett:use-the-right-core, r=tgross35
jhpratt Aug 20, 2025
daec924
Rollup merge of #145622 - tgross35:remove-builtins-patch, r=Mark-Simu…
jhpratt Aug 20, 2025
8c27ba6
Rollup merge of #145626 - folkertdev:prefetch-fallback, r=Amanieu
jhpratt Aug 20, 2025
78be8dc
Merge ref 'f605b57042ff' from rust-lang/rust
Aug 20, 2025
49ac6d8
Pass `alloc-variant-zeroed` to LLVM
clubby789 Jul 17, 2025
ad625e6
Add flock support for cygwin
Berrysoft Aug 20, 2025
9bcee26
Auto merge of #144086 - clubby789:alloc-zeroed, r=nikic
bors Aug 20, 2025
cfa0103
fix: typo
ttajakka Aug 20, 2025
e99feb4
Migrate `panic_unwind` to use `cfg_select!`
cuviper Aug 20, 2025
3d65137
Rollup merge of #143383 - fee1-dead-contrib:push-mstmlwuskxyy, r=dtolnay
jhpratt Aug 21, 2025
23d9cd8
Rollup merge of #144758 - QnJ1c2kNCg:master, r=Noratrieb
jhpratt Aug 21, 2025
755ebb7
Rollup merge of #145415 - a4lg:riscv-implication-to-c, r=Amanieu
jhpratt Aug 21, 2025
1449934
Rollup merge of #145525 - typesanitizer:vg/doc, r=Mark-Simulacrum
jhpratt Aug 21, 2025
e51d7a5
Rollup merge of #145593 - RalfJung:unsafepinned-raw_get, r=Mark-Simul…
jhpratt Aug 21, 2025
a11eda9
Rollup merge of #145673 - Berrysoft:cygwin-fix-flock, r=joshtriplett
jhpratt Aug 21, 2025
a40847f
Rollup merge of #145678 - ttajakka:master, r=estebank
jhpratt Aug 21, 2025
84be05f
Consolidate panicking functions in `slice/index.rs`
Kmeakin Jul 25, 2025
9a75e6e
Auto merge of #145647 - RalfJung:miri, r=RalfJung
bors Aug 21, 2025
b551f75
Introduce Reborrow lang item and trait
aapoalas Aug 21, 2025
084c234
Rollup merge of #137494 - nabijaczleweli:dup, r=Mark-Simulacrum
jhpratt Aug 21, 2025
15b856b
Rollup merge of #145137 - Kmeakin:km/optimize-slice-index-panicking, …
jhpratt Aug 21, 2025
764ad79
Rollup merge of #145689 - cuviper:panic_unwind-cfg, r=joshtriplett
jhpratt Aug 21, 2025
9fdc1da
modify `LazyLock` poison panic message
connortsui20 Aug 22, 2025
3da5817
Rollup merge of #132087 - ijchen:issue-131770-fix, r=dtolnay
jhpratt Aug 23, 2025
667bde0
Rollup merge of #144648 - connortsui20:nonpoison_rwlock, r=Mark-Simul…
jhpratt Aug 23, 2025
c65cb62
Rollup merge of #145633 - qxzcode:patch-1, r=jhpratt
jhpratt Aug 23, 2025
5839559
Rollup merge of #145726 - aapoalas:reborrow-lang-experiment, r=petroc…
jhpratt Aug 23, 2025
ed6f938
Auto merge of #145567 - clubby789:cargo_update, r=clubby789
bors Aug 23, 2025
c0964b5
Rollup merge of #144452 - morinmorin:apple/update_read_limit, r=Chris…
samueltardieu Aug 23, 2025
99e758b
Rollup merge of #145515 - Kmeakin:km/optimize-char-encode-utf8, r=Mar…
samueltardieu Aug 23, 2025
1b63e44
std/src/lib.rs: mention "search button" instead of "search bar"
ada4a Aug 23, 2025
335398a
Allow `integer_to_ptr_transmutes` in core
Urgau Jul 27, 2025
14c5f44
Rollup merge of #144531 - Urgau:int_to_ptr_transmutes, r=jackh726
jhpratt Aug 24, 2025
d69503d
Rollup merge of #145307 - connortsui20:lazylock-poison-msg, r=Amanieu
jhpratt Aug 24, 2025
10ce6f6
Rollup merge of #145799 - ada4a:patch-3, r=GuillaumeGomez
jhpratt Aug 24, 2025
f10e36e
Dial down detail of B-tree description
hkBst Jan 20, 2025
6600102
focus more on ordered aspect and restore old comments
hkBst Jan 21, 2025
4401a69
Prevent confusion with insertion-ordered maps.
hkBst Jan 22, 2025
b8acf06
Rollup merge of #135761 - hkBst:patch-9, r=ibraheemdev
Zalathar Aug 25, 2025
5ef548c
Merge branch 'subtree/library'
Aug 26, 2025
9242089
Update toolchain to 2025-08-26
Aug 26, 2025
eb44f9d
Update Kani version to 1f6d355f39e39091e632bea92bc1b0cb6b63ab95
Aug 26, 2025
9efa317
Update Flux to latest version
tautschnig Sep 9, 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
2 changes: 1 addition & 1 deletion .github/workflows/flux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
FIXPOINT_VERSION: "556104ba5508891c357b0bdf819ce706e93d9349"
FLUX_VERSION: "a17246965a8752e3d3d4e3559865311048bb61f7"
FLUX_VERSION: "b0cec81c42bc6e210f675b46dd5b4b16774b0d0e"

jobs:
check-flux-on-core:
Expand Down
13 changes: 6 additions & 7 deletions library/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion library/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ rustflags = ["-Cpanic=abort"]
rustc-std-workspace-core = { path = 'rustc-std-workspace-core' }
rustc-std-workspace-alloc = { path = 'rustc-std-workspace-alloc' }
rustc-std-workspace-std = { path = 'rustc-std-workspace-std' }
compiler_builtins = { path = "compiler-builtins/compiler-builtins" }
1 change: 1 addition & 0 deletions library/alloc/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ unsafe extern "Rust" {
#[rustc_allocator]
#[rustc_nounwind]
#[rustc_std_internal_symbol]
#[rustc_allocator_zeroed_variant = "__rust_alloc_zeroed"]
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
#[rustc_deallocator]
#[rustc_nounwind]
Expand Down
76 changes: 45 additions & 31 deletions library/alloc/src/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,15 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;

/// An ordered map based on a [B-Tree].
///
/// B-Trees represent a fundamental compromise between cache-efficiency and actually minimizing
/// the amount of work performed in a search. In theory, a binary search tree (BST) is the optimal
/// choice for a sorted map, as a perfectly balanced BST performs the theoretical minimum amount of
/// comparisons necessary to find an element (log<sub>2</sub>n). However, in practice the way this
/// is done is *very* inefficient for modern computer architectures. In particular, every element
/// is stored in its own individually heap-allocated node. This means that every single insertion
/// triggers a heap-allocation, and every single comparison should be a cache-miss. Since these
/// are both notably expensive things to do in practice, we are forced to, at the very least,
/// reconsider the BST strategy.
///
/// A B-Tree instead makes each node contain B-1 to 2B-1 elements in a contiguous array. By doing
/// this, we reduce the number of allocations by a factor of B, and improve cache efficiency in
/// searches. However, this does mean that searches will have to do *more* comparisons on average.
/// The precise number of comparisons depends on the node search strategy used. For optimal cache
/// efficiency, one could search the nodes linearly. For optimal comparisons, one could search
/// the node using binary search. As a compromise, one could also perform a linear search
/// that initially only checks every i<sup>th</sup> element for some choice of i.
/// Given a key type with a [total order], an ordered map stores its entries in key order.
/// That means that keys must be of a type that implements the [`Ord`] trait,
/// such that two keys can always be compared to determine their [`Ordering`].
/// Examples of keys with a total order are strings with lexicographical order,
/// and numbers with their natural order.
///
/// Currently, our implementation simply performs naive linear search. This provides excellent
/// performance on *small* nodes of elements which are cheap to compare. However in the future we
/// would like to further explore choosing the optimal search strategy based on the choice of B,
/// and possibly other factors. Using linear search, searching for a random element is expected
/// to take B * log(n) comparisons, which is generally worse than a BST. In practice,
/// however, performance is excellent.
/// Iterators obtained from functions such as [`BTreeMap::iter`], [`BTreeMap::into_iter`], [`BTreeMap::values`], or
/// [`BTreeMap::keys`] produce their items in key order, and take worst-case logarithmic and
/// amortized constant time per item returned.
///
/// It is a logic error for a key to be modified in such a way that the key's ordering relative to
/// any other key, as determined by the [`Ord`] trait, changes while it is in the map. This is
Expand All @@ -72,14 +57,6 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;
/// `BTreeMap` that observed the logic error and not result in undefined behavior. This could
/// include panics, incorrect results, aborts, memory leaks, and non-termination.
///
/// Iterators obtained from functions such as [`BTreeMap::iter`], [`BTreeMap::into_iter`], [`BTreeMap::values`], or
/// [`BTreeMap::keys`] produce their items in order by key, and take worst-case logarithmic and
/// amortized constant time per item returned.
///
/// [B-Tree]: https://en.wikipedia.org/wiki/B-tree
/// [`Cell`]: core::cell::Cell
/// [`RefCell`]: core::cell::RefCell
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -169,6 +146,43 @@ pub(super) const MIN_LEN: usize = node::MIN_LEN_AFTER_SPLIT;
/// // modify an entry before an insert with in-place mutation
/// player_stats.entry("mana").and_modify(|mana| *mana += 200).or_insert(100);
/// ```
///
/// # Background
///
/// A B-tree is (like) a [binary search tree], but adapted to the natural granularity that modern
/// machines like to consume data at. This means that each node contains an entire array of elements,
/// instead of just a single element.
///
/// B-Trees represent a fundamental compromise between cache-efficiency and actually minimizing
/// the amount of work performed in a search. In theory, a binary search tree (BST) is the optimal
/// choice for a sorted map, as a perfectly balanced BST performs the theoretical minimum number of
/// comparisons necessary to find an element (log<sub>2</sub>n). However, in practice the way this
/// is done is *very* inefficient for modern computer architectures. In particular, every element
/// is stored in its own individually heap-allocated node. This means that every single insertion
/// triggers a heap-allocation, and every comparison is a potential cache-miss due to the indirection.
/// Since both heap-allocations and cache-misses are notably expensive in practice, we are forced to,
/// at the very least, reconsider the BST strategy.
///
/// A B-Tree instead makes each node contain B-1 to 2B-1 elements in a contiguous array. By doing
/// this, we reduce the number of allocations by a factor of B, and improve cache efficiency in
/// searches. However, this does mean that searches will have to do *more* comparisons on average.
/// The precise number of comparisons depends on the node search strategy used. For optimal cache
/// efficiency, one could search the nodes linearly. For optimal comparisons, one could search
/// the node using binary search. As a compromise, one could also perform a linear search
/// that initially only checks every i<sup>th</sup> element for some choice of i.
///
/// Currently, our implementation simply performs naive linear search. This provides excellent
/// performance on *small* nodes of elements which are cheap to compare. However in the future we
/// would like to further explore choosing the optimal search strategy based on the choice of B,
/// and possibly other factors. Using linear search, searching for a random element is expected
/// to take B * log(n) comparisons, which is generally worse than a BST. In practice,
/// however, performance is excellent.
///
/// [B-Tree]: https://en.wikipedia.org/wiki/B-tree
/// [binary search tree]: https://en.wikipedia.org/wiki/Binary_search_tree
/// [total order]: https://en.wikipedia.org/wiki/Total_order
/// [`Cell`]: core::cell::Cell
/// [`RefCell`]: core::cell::RefCell
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "BTreeMap")]
#[rustc_insignificant_dtor]
Expand Down
8 changes: 4 additions & 4 deletions library/core/src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,11 @@ impl<T, const N: usize> [T; N] {
/// assert_eq!(strings.len(), 3);
/// ```
#[stable(feature = "array_methods", since = "1.77.0")]
#[rustc_const_unstable(feature = "const_array_each_ref", issue = "133289")]
#[rustc_const_stable(feature = "const_array_each_ref", since = "CURRENT_RUSTC_VERSION")]
pub const fn each_ref(&self) -> [&T; N] {
let mut buf = [null::<T>(); N];

// FIXME(const-hack): We would like to simply use iterators for this (as in the original implementation), but this is not allowed in constant expressions.
// FIXME(const_trait_impl): We would like to simply use iterators for this (as in the original implementation), but this is not allowed in constant expressions.
let mut i = 0;
while i < N {
buf[i] = &raw const self[i];
Expand All @@ -652,11 +652,11 @@ impl<T, const N: usize> [T; N] {
/// assert_eq!(floats, [0.0, 2.7, -1.0]);
/// ```
#[stable(feature = "array_methods", since = "1.77.0")]
#[rustc_const_unstable(feature = "const_array_each_ref", issue = "133289")]
#[rustc_const_stable(feature = "const_array_each_ref", since = "CURRENT_RUSTC_VERSION")]
pub const fn each_mut(&mut self) -> [&mut T; N] {
let mut buf = [null_mut::<T>(); N];

// FIXME(const-hack): We would like to simply use iterators for this (as in the original implementation), but this is not allowed in constant expressions.
// FIXME(const_trait_impl): We would like to simply use iterators for this (as in the original implementation), but this is not allowed in constant expressions.
let mut i = 0;
while i < N {
buf[i] = &raw mut self[i];
Expand Down
47 changes: 26 additions & 21 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1874,28 +1874,33 @@ pub const unsafe fn encode_utf8_raw_unchecked(code: u32, dst: *mut u8) {
// SAFETY: The caller must guarantee that the buffer pointed to by `dst`
// is at least `len` bytes long.
unsafe {
match len {
1 => {
*dst = code as u8;
}
2 => {
*dst = (code >> 6 & 0x1F) as u8 | TAG_TWO_B;
*dst.add(1) = (code & 0x3F) as u8 | TAG_CONT;
}
3 => {
*dst = (code >> 12 & 0x0F) as u8 | TAG_THREE_B;
*dst.add(1) = (code >> 6 & 0x3F) as u8 | TAG_CONT;
*dst.add(2) = (code & 0x3F) as u8 | TAG_CONT;
}
4 => {
*dst = (code >> 18 & 0x07) as u8 | TAG_FOUR_B;
*dst.add(1) = (code >> 12 & 0x3F) as u8 | TAG_CONT;
*dst.add(2) = (code >> 6 & 0x3F) as u8 | TAG_CONT;
*dst.add(3) = (code & 0x3F) as u8 | TAG_CONT;
}
// SAFETY: `char` always takes between 1 and 4 bytes to encode in UTF-8.
_ => crate::hint::unreachable_unchecked(),
if len == 1 {
*dst = code as u8;
return;
}

let last1 = (code >> 0 & 0x3F) as u8 | TAG_CONT;
let last2 = (code >> 6 & 0x3F) as u8 | TAG_CONT;
let last3 = (code >> 12 & 0x3F) as u8 | TAG_CONT;
let last4 = (code >> 18 & 0x3F) as u8 | TAG_FOUR_B;

if len == 2 {
*dst = last2 | TAG_TWO_B;
*dst.add(1) = last1;
return;
}

if len == 3 {
*dst = last3 | TAG_THREE_B;
*dst.add(1) = last2;
*dst.add(2) = last1;
return;
}

*dst = last4;
*dst.add(1) = last3;
*dst.add(2) = last2;
*dst.add(3) = last1;
}
}

Expand Down
15 changes: 12 additions & 3 deletions library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,9 @@ pub fn min<T: Ord>(v1: T, v2: T) -> T {
///
/// Returns the first argument if the comparison determines them to be equal.
///
/// The parameter order is preserved when calling the `compare` function, i.e. `v1` is
/// always passed as the first argument and `v2` as the second.
///
/// # Examples
///
/// ```
Expand All @@ -1574,7 +1577,7 @@ pub fn min<T: Ord>(v1: T, v2: T) -> T {
#[must_use]
#[stable(feature = "cmp_min_max_by", since = "1.53.0")]
pub fn min_by<T, F: FnOnce(&T, &T) -> Ordering>(v1: T, v2: T, compare: F) -> T {
if compare(&v2, &v1).is_lt() { v2 } else { v1 }
if compare(&v1, &v2).is_le() { v1 } else { v2 }
}

/// Returns the element that gives the minimum value from the specified function.
Expand Down Expand Up @@ -1646,6 +1649,9 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T {
///
/// Returns the second argument if the comparison determines them to be equal.
///
/// The parameter order is preserved when calling the `compare` function, i.e. `v1` is
/// always passed as the first argument and `v2` as the second.
///
/// # Examples
///
/// ```
Expand All @@ -1666,7 +1672,7 @@ pub fn max<T: Ord>(v1: T, v2: T) -> T {
#[must_use]
#[stable(feature = "cmp_min_max_by", since = "1.53.0")]
pub fn max_by<T, F: FnOnce(&T, &T) -> Ordering>(v1: T, v2: T, compare: F) -> T {
if compare(&v2, &v1).is_lt() { v1 } else { v2 }
if compare(&v1, &v2).is_gt() { v1 } else { v2 }
}

/// Returns the element that gives the maximum value from the specified function.
Expand Down Expand Up @@ -1745,6 +1751,9 @@ where
///
/// Returns `[v1, v2]` if the comparison determines them to be equal.
///
/// The parameter order is preserved when calling the `compare` function, i.e. `v1` is
/// always passed as the first argument and `v2` as the second.
///
/// # Examples
///
/// ```
Expand All @@ -1769,7 +1778,7 @@ pub fn minmax_by<T, F>(v1: T, v2: T, compare: F) -> [T; 2]
where
F: FnOnce(&T, &T) -> Ordering,
{
if compare(&v2, &v1).is_lt() { [v2, v1] } else { [v1, v2] }
if compare(&v1, &v2).is_le() { [v1, v2] } else { [v2, v1] }
}

/// Returns minimum and maximum values with respect to the specified key function.
Expand Down
51 changes: 35 additions & 16 deletions library/core/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,53 +267,72 @@ pub unsafe fn atomic_fence<const ORD: AtomicOrdering>();
pub unsafe fn atomic_singlethreadfence<const ORD: AtomicOrdering>();

/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
/// if supported; otherwise, it is a no-op.
/// for the given address if supported; otherwise, it is a no-op.
/// Prefetches have no effect on the behavior of the program but can change its performance
/// characteristics.
///
/// The `locality` argument must be a constant integer and is a temporal locality specifier
/// ranging from (0) - no locality, to (3) - extremely local keep in cache.
/// The `LOCALITY` argument is a temporal locality specifier ranging from (0) - no locality,
/// to (3) - extremely local keep in cache.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn prefetch_read_data<T>(data: *const T, locality: i32);
#[miri::intrinsic_fallback_is_spec]
pub const fn prefetch_read_data<T, const LOCALITY: i32>(data: *const T) {
// This operation is a no-op, unless it is overridden by the backend.
let _ = data;
}

/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
/// if supported; otherwise, it is a no-op.
/// for the given address if supported; otherwise, it is a no-op.
/// Prefetches have no effect on the behavior of the program but can change its performance
/// characteristics.
///
/// The `locality` argument must be a constant integer and is a temporal locality specifier
/// ranging from (0) - no locality, to (3) - extremely local keep in cache.
/// The `LOCALITY` argument is a temporal locality specifier ranging from (0) - no locality,
/// to (3) - extremely local keep in cache.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn prefetch_write_data<T>(data: *const T, locality: i32);
#[miri::intrinsic_fallback_is_spec]
pub const fn prefetch_write_data<T, const LOCALITY: i32>(data: *const T) {
// This operation is a no-op, unless it is overridden by the backend.
let _ = data;
}

/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
/// if supported; otherwise, it is a no-op.
/// for the given address if supported; otherwise, it is a no-op.
/// Prefetches have no effect on the behavior of the program but can change its performance
/// characteristics.
///
/// The `locality` argument must be a constant integer and is a temporal locality specifier
/// ranging from (0) - no locality, to (3) - extremely local keep in cache.
/// The `LOCALITY` argument is a temporal locality specifier ranging from (0) - no locality,
/// to (3) - extremely local keep in cache.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn prefetch_read_instruction<T>(data: *const T, locality: i32);
#[miri::intrinsic_fallback_is_spec]
pub const fn prefetch_read_instruction<T, const LOCALITY: i32>(data: *const T) {
// This operation is a no-op, unless it is overridden by the backend.
let _ = data;
}

/// The `prefetch` intrinsic is a hint to the code generator to insert a prefetch instruction
/// if supported; otherwise, it is a no-op.
/// for the given address if supported; otherwise, it is a no-op.
/// Prefetches have no effect on the behavior of the program but can change its performance
/// characteristics.
///
/// The `locality` argument must be a constant integer and is a temporal locality specifier
/// ranging from (0) - no locality, to (3) - extremely local keep in cache.
/// The `LOCALITY` argument is a temporal locality specifier ranging from (0) - no locality,
/// to (3) - extremely local keep in cache.
///
/// This intrinsic does not have a stable counterpart.
#[rustc_intrinsic]
#[rustc_nounwind]
pub unsafe fn prefetch_write_instruction<T>(data: *const T, locality: i32);
#[miri::intrinsic_fallback_is_spec]
pub const fn prefetch_write_instruction<T, const LOCALITY: i32>(data: *const T) {
// This operation is a no-op, unless it is overridden by the backend.
let _ = data;
}

/// Executes a breakpoint trap, for inspection by a debugger.
///
Expand Down
Loading
Loading