Skip to content

Merge subtree update for toolchain nightly-2025-05-06 #354

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 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
ed9ccd0
Rollup merge of #139677 - jchecahi:profiler-builtin-rtlib-path-fix, r…
ChrisDenton Apr 13, 2025
2cbb559
Rollup merge of #139683 - ChrisDenton:windows-with-native, r=tgross35…
ChrisDenton Apr 13, 2025
50f5112
Rollup merge of #139710 - thaliaarchi:move-args-pal, r=joboet
ChrisDenton Apr 13, 2025
ef96788
Rollup merge of #139726 - Amanieu:select_unpredictable_hint, r=dtolnay
ChrisDenton Apr 13, 2025
ec60cd5
std/thread: Use default stack size from menuconfig for NuttX
no1wudi Apr 13, 2025
d84a83b
Auto merge of #139746 - ChrisDenton:rollup-eq08b2e, r=ChrisDenton
bors Apr 13, 2025
b7ac487
std: sys: process: uefi: Use NULL stdin by default
Ayush1325 Apr 8, 2025
3f3732a
std: sys: stdio: uefi: Tread UNSUPPORTED Status as read(0)
Ayush1325 Apr 13, 2025
27bed75
std: sys: process: uefi: Allow specifying Stdin
Ayush1325 Apr 10, 2025
fc85ced
Hermit: Unify std::env::args with Unix
thaliaarchi Apr 12, 2025
0e2c537
Rollup merge of #137043 - Sky9x:unsafe-pinned-pt1-libs, r=tgross35,Ra…
jhpratt Apr 13, 2025
2554815
Avoid unused clones in Cloned<I> and Copied<I>
thaliaarchi Apr 13, 2025
fb95ebb
Report span of test when should_panic test failed
xizheyin Mar 17, 2025
80f232e
docs: Add example to `Iterator::take` with `by_ref`
ongardie Apr 14, 2025
e45b238
Clarify why SGX code specifies linkage/symbol names for certain statics
Apr 14, 2025
aa425a8
ptr docs: add missing backtics around 'usize'
RalfJung Apr 14, 2025
1bebfa1
Fix some grammar errors and hyperlinks in doc for `trait Allocator`
Lee-Janggun Apr 14, 2025
543820f
Auto merge of #138603 - xizheyin:issue-137405, r=chenyukang
bors Apr 14, 2025
5db3c5f
Auto merge of #139814 - matthiaskrgr:rollup-lxkkcz6, r=matthiaskrgr
bors Apr 14, 2025
7ace926
Fix: Map EOPNOTSUPP to ErrorKind::Unsupported on Unix
0x79de Apr 14, 2025
62e50de
Rollup merge of #139745 - thaliaarchi:iter-unused-clone-copy, r=joboet
matthiaskrgr Apr 14, 2025
2bca634
std: add Output::exit_ok
lolbinarycat Apr 8, 2025
8ff0ee1
Basic tests of MPMC receiver cloning
glyn Apr 15, 2025
caa9632
Rollup merge of #138374 - celinval:issue-136925-const-contract, r=com…
Zalathar Apr 15, 2025
e458986
Rollup merge of #139517 - Ayush1325:uefi-cmd-stdin-null, r=joboet
Zalathar Apr 15, 2025
39e05bf
Rollup merge of #139554 - lolbinarycat:std-output-exit_ok, r=tgross35
Zalathar Apr 15, 2025
f162c7f
Rollup merge of #139671 - m-ou-se:proc-macro-span, r=dtolnay
Zalathar Apr 15, 2025
504f564
Rollup merge of #139750 - no1wudi:fix, r=tgross35
Zalathar Apr 15, 2025
887af61
Rollup merge of #139822 - 0x79de:fix-eopnotsupp-mapping, r=dtolnay
Zalathar Apr 15, 2025
a40f2d0
Rollup merge of #139836 - glyn:test-mpmc-receiver-cloning, r=jhpratt
Zalathar Apr 15, 2025
143021c
Remove #![feature(no_sanitize)]
tamird Apr 14, 2025
18b4143
Use full path for core::mem::transmute
Darksonn Apr 14, 2025
829afa8
Add comment
Darksonn Apr 14, 2025
885f27c
Auto merge of #139845 - Zalathar:rollup-u5u5y1v, r=Zalathar
bors Apr 15, 2025
34c490a
Implement `pin!()` using `super let`.
m-ou-se Mar 27, 2025
8c88f85
Auto merge of #139632 - Darksonn:cfi-fmt, r=m-ou-se
bors Apr 15, 2025
b4d3644
Stabilize proc_macro::Span::{start, end, line, column}.
m-ou-se Apr 15, 2025
3429b5f
Add warning comment to `Take::get_ref` and `Chain::get_ref`
joshtriplett Apr 15, 2025
26513b9
Also remove the no_sanitize feature for std
1c3t3a Apr 15, 2025
5d82f7a
Update stdarch submodule
GuillaumeGomez Apr 16, 2025
c7c402d
fix incorrect type in cstr `to_string_lossy()` docs
jnqnfe Apr 16, 2025
9a520f8
Rollup merge of #139667 - 1c3t3a:remove-no-sanitize, r=m-ou-se
matthiaskrgr Apr 16, 2025
ee40d87
fix missing word in comment
mumbleskates Apr 17, 2025
ed7cbf2
Fix drop handling in `hint::select_unpredictable`
Amanieu Apr 17, 2025
779deec
Point UNIX_EPOCH to associated constant in SystemTime docs
coolreader18 Apr 17, 2025
ed28bd2
Be more specific about the error in the SystemTime example
coolreader18 Apr 17, 2025
9c7211b
refactor(test): Decouple parsing from help generation
epage Jan 27, 2025
39890cf
fix(test): Expose '--no-capture', deprecating '--nocapture'
epage Jan 27, 2025
220a2e5
Update `compiler-builtins` to 0.1.155
tgross35 Apr 16, 2025
9267d04
Rollup merge of #139483 - RalfJung:nan, r=tgross35
matthiaskrgr Apr 17, 2025
1b2ff29
Rollup merge of #139977 - Amanieu:select_unpredictable_drop, r=RalfJung
matthiaskrgr Apr 17, 2025
ee51ea6
Rollup merge of #139553 - petrosagg:channel-double-free, r=RalfJung,t…
matthiaskrgr Apr 18, 2025
4b57af8
Rollup merge of #139934 - tgross35:update-builtins, r=tgross35
matthiaskrgr Apr 18, 2025
56da6b5
Merge from rustc
Apr 18, 2025
35b0ea7
LocalKey<T>: document that the dtor should not panic
ShE3py Apr 18, 2025
36a886a
rtprintpanic: clarify that the error is aborting the process
ShE3py Apr 18, 2025
efaf4e0
Auto merge of #139996 - matthiaskrgr:rollup-0nka2hw, r=matthiaskrgr
bors Apr 18, 2025
9ab89ad
Invert `<CString as Deref>::deref` and `CString::as_c_str`
tamird Apr 18, 2025
4cb999a
Move `<CStr as Debug>` test to coretests
tamird Apr 18, 2025
1585382
Remove errant doc comment lines
tamird Apr 18, 2025
6130899
std: Use fstatat() on illumos
pfmooney Apr 18, 2025
1f202b0
Sort Unix env constants alphabetically by target_os
thaliaarchi Apr 15, 2025
0411c52
Combine env consts into std::sys::env_consts
thaliaarchi Apr 15, 2025
05ebb95
Handle unsupported fallback
thaliaarchi Apr 15, 2025
73caf53
Merge from rustc
Apr 19, 2025
a807735
Improve rustdocs on slice_as_chunks methods
scottmcm Apr 19, 2025
913b8f5
Auto merge of #139114 - m-ou-se:super-let-pin, r=davidtwco
bors Apr 19, 2025
2ffa166
simd_select_bitmask: the 'padding' bits in the mask are just ignored
RalfJung Apr 19, 2025
6b3d1e9
add next_index to Enumerate
jogru0 Apr 8, 2025
f5e95cb
added doctest for Enumerate::next_index
jogru0 Apr 19, 2025
f89b8ee
added test for Enumerate::next_index on empty iterator
jogru0 Apr 19, 2025
efd7912
Rollup merge of #139535 - ChrisDenton:default-ptr, r=tgross35
ChrisDenton Apr 19, 2025
cfa1b2a
Rollup merge of #139922 - jnqnfe:cstr_doc_fix, r=jhpratt
ChrisDenton Apr 19, 2025
e3adc21
Rollup merge of #140016 - pfmooney:illumos-fstatat, r=jhpratt
ChrisDenton Apr 19, 2025
b9cfe06
Rollup merge of #139868 - thaliaarchi:move-env-consts-pal, r=joboet
ChrisDenton Apr 19, 2025
9bff288
Rollup merge of #139533 - jogru0:130711, r=Mark-Simulacrum
ChrisDenton Apr 19, 2025
d9af121
docs: fix typo change from inconstants to invariants
c-git Apr 19, 2025
d0721d4
Auto merge of #140043 - ChrisDenton:rollup-vwf0s9j, r=ChrisDenton
bors Apr 20, 2025
07c76e5
Merge from rustc
Apr 20, 2025
4221e44
std: mention `remove_dir_all` can emit `DirectoryNotEmpty` when concu…
xizheyin Apr 20, 2025
07de1a6
stabilize `naked_functions`
folkertdev Dec 18, 2024
1ce17ed
Add `#[rustc_no_implicit_autorefs]` and apply it to std methods
Urgau Mar 30, 2024
0c81718
Implement lint against dangerous implicit autorefs
Urgau Feb 10, 2024
2f0abc8
Allow `dangerous_implicit_autorefs` lint in some tests
Urgau Mar 30, 2024
e3fdd2f
simd intrinsics with mask: accept unsigned integer masks
RalfJung Mar 3, 2025
987e8cd
Rollup merge of #137953 - RalfJung:simd-intrinsic-masks, r=WaffleLapkin
ChrisDenton Apr 20, 2025
8427db1
Rollup merge of #140054 - c-git:patch-1, r=joboet
ChrisDenton Apr 20, 2025
19a9fe5
Update `libc` to 0.2.172 for std
Berrysoft Apr 20, 2025
01ff042
Use `currently` for futher improvement
xizheyin Apr 20, 2025
2ab28f3
Rollup merge of #138870 - beetrees:tier-2-nans, r=RalfJung
ChrisDenton Apr 20, 2025
1f234b5
Auto merge of #140079 - ChrisDenton:rollup-2h5cg94, r=ChrisDenton
bors Apr 20, 2025
df67370
Solved suggestions
Natural-selection1 Apr 21, 2025
7ece698
Solved suggestions
Natural-selection1 Apr 21, 2025
9178adb
Auto merge of #139727 - rust-lang:cargo_update, r=Mark-Simulacrum
bors Apr 21, 2025
3ecfe0e
cleanup redundant pattern instances
jogru0 Apr 21, 2025
49649b6
Replace colon with parentheses, add missing period
tamird Apr 18, 2025
79729f9
Rollup merge of #139946 - mumbleskates:any-fix-missing-word, r=jhpratt
ChrisDenton Apr 21, 2025
f5c78cd
Rollup merge of #139982 - coolreader18:time-doc-tweak, r=jhpratt
ChrisDenton Apr 21, 2025
e4a3c15
Rollup merge of #140009 - ShE3py:tls-abort, r=thomcc
ChrisDenton Apr 21, 2025
7f7d45c
Rollup merge of #134213 - folkertdev:stabilize-naked-functions, r=tgr…
ChrisDenton Apr 21, 2025
b6fae47
Rollup merge of #139711 - thaliaarchi:hermit-args, r=jhpratt
ChrisDenton Apr 21, 2025
809c35f
Rollup merge of #139795 - jethrogb:jb/sgx-linkage-comments, r=joboet
ChrisDenton Apr 21, 2025
a33105e
Rollup merge of #140111 - jogru0:redundant_pattern, r=compiler-errors
ChrisDenton Apr 21, 2025
9be04dc
Rollup merge of #140118 - tamird:cstr-cleanup, r=joboet
ChrisDenton Apr 21, 2025
98e2a42
Auto merge of #140127 - ChrisDenton:rollup-2kye32h, r=ChrisDenton
bors Apr 21, 2025
54a7b4f
Rollup merge of #140081 - Berrysoft:update-libc-172, r=tgross35
ChrisDenton Apr 22, 2025
29a3b8c
Move `sys::pal::os::Env` into `sys::env`
thaliaarchi Apr 22, 2025
0975db2
Move zkVM constants into `sys::env_consts`
thaliaarchi Apr 22, 2025
d81b4a0
Fix `unsafe_op_in_unsafe_fn` for Unix env
thaliaarchi Apr 22, 2025
4b7ef7a
Deduplicate unsupported env items
thaliaarchi Apr 22, 2025
f19866c
Merge from rustc
Apr 22, 2025
eb0af23
Unify owned `Env` types between platforms
thaliaarchi Apr 22, 2025
6833be3
Update `compiler_builtins` to 0.1.156
tgross35 Apr 22, 2025
5a2bea0
test_nan: ensure the NAN contant is quiet
RalfJung Apr 22, 2025
2099451
MANTISSA_DIGITS: explain relation to bitwise representation
RalfJung Apr 22, 2025
49a4cfe
Validate extension in `PathBuf::add_extension`
thaliaarchi Apr 22, 2025
adc93e0
Rollup merge of #139617 - Berrysoft:cygwin-posix-spawn, r=joboet
ChrisDenton Apr 22, 2025
6532696
Rollup merge of #140149 - RalfJung:test_nan, r=tgross35
ChrisDenton Apr 22, 2025
8fe7288
Rollup merge of #140146 - tgross35:update-builtins, r=tgross35
ChrisDenton Apr 23, 2025
0d44c14
Rollup merge of #140163 - thaliaarchi:pathbuf-validate-extension, r=C…
ChrisDenton Apr 23, 2025
7ef6591
Merge from rustc
Apr 23, 2025
b019282
Make algebraic intrinsics into 'const fn' items; Make algebraic funct…
bjoernager Apr 22, 2025
1999153
Document breaking out of a named code block
ktnlvr Apr 23, 2025
adad3ab
fix f*::MAX_EXP and MIN_EXP docs
RalfJung Apr 22, 2025
612cd67
Impl new API `std::os::unix::fs::mkfifo` under feature `unix_fifo`
NobodyXu Apr 6, 2025
563e49d
Auto merge of #140180 - ChrisDenton:rollup-5pvs08u, r=ChrisDenton
bors Apr 23, 2025
6b2f90d
Work around cygwin issue on timeout
Berrysoft Apr 23, 2025
3711fc1
Remove some unnecessary clones.
nnethercote Apr 23, 2025
4be945c
keep original text for is_ok and is_err
Natural-selection1 Apr 24, 2025
eab6a35
add examples using .as_ref() for is_err_and and is_ok_and
Natural-selection1 Apr 24, 2025
66dba3d
keep the original text for is_some and is_none
Natural-selection1 Apr 24, 2025
e18d2db
add examples using .as_ref() for is_some_and and is_none_or
Natural-selection1 Apr 24, 2025
7afa7f7
fix example
Natural-selection1 Apr 24, 2025
ea6d0f4
fix doc error
Natural-selection1 Apr 24, 2025
0dbd4a1
Mention average in midpoint documentations
Urgau Apr 20, 2025
0290335
Rollup merge of #134446 - tgross35:stabilize-cell_update, r=jhpratt
matthiaskrgr Apr 24, 2025
7c14774
Rollup merge of #139307 - xizheyin:issue-139296, r=joboet
matthiaskrgr Apr 24, 2025
3088df4
Rollup merge of #139450 - NobodyXu:new-api/make-fifo, r=tgross35
matthiaskrgr Apr 24, 2025
069c49c
Rollup merge of #140232 - nnethercote:rm-unnecessary-clones, r=Sparro…
matthiaskrgr Apr 24, 2025
aa9381c
Suggest {to,from}_ne_bytes for transmutations between arrays and inte…
bend-n Mar 31, 2025
e5bd667
stdarch
bend-n Apr 18, 2025
81eae48
Merge from rustc
RalfJung Apr 24, 2025
f05cfdc
Rollup merge of #140075 - Urgau:midpoint-average, r=tgross35
matthiaskrgr Apr 24, 2025
f6cec8b
Auto merge of #140245 - matthiaskrgr:rollup-e0fwsfv, r=matthiaskrgr
bors Apr 24, 2025
5afc2e4
Rollup merge of #136083 - bend-n:⃤⃤, r=lcnr
matthiaskrgr Apr 24, 2025
0dca7bb
Rollup merge of #140141 - thaliaarchi:env-consts/zkvm, r=joboet
matthiaskrgr Apr 24, 2025
2e42aa9
Rollup merge of #140150 - RalfJung:MAX_EXP, r=tgross35
matthiaskrgr Apr 24, 2025
558461d
Rollup merge of #140172 - bjoernager:const-float-algebraic, r=RalfJung
matthiaskrgr Apr 24, 2025
083722c
Deprecate the unstable `concat_idents!`
tgross35 Feb 26, 2025
addf27c
Rollup merge of #140210 - Berrysoft:cygwin-timedwait, r=joboet
matthiaskrgr Apr 24, 2025
f3abf1f
Solved suggestions
Natural-selection1 Apr 25, 2025
d7c61d5
Merge from rustc
Apr 25, 2025
7c9033e
Rollup merge of #137653 - tgross35:deprecate-concat_idents, r=working…
matthiaskrgr Apr 25, 2025
c290e39
Rollup merge of #138957 - Natural-selection1:update-Option-doc, r=Ama…
matthiaskrgr Apr 25, 2025
1eb4c4c
Rollup merge of #140143 - thaliaarchi:move-env-pal, r=joboet
matthiaskrgr Apr 25, 2025
a69d55b
docs(std): mention const blocks in const keyword doc page
ismailarilik Apr 25, 2025
6f7c25d
Auto merge of #140273 - matthiaskrgr:rollup-rxmuvkg, r=matthiaskrgr
bors Apr 25, 2025
0cc7fb1
Auto merge of #140282 - matthiaskrgr:rollup-g6ze4jj, r=matthiaskrgr
bors Apr 25, 2025
40ff8b3
Rollup merge of #138968 - Natural-selection1:update-Result-doc, r=Ama…
matthiaskrgr Apr 25, 2025
7cab094
Rollup merge of #139572 - ismailarilik:docs/std/mention-const-blocks-…
matthiaskrgr Apr 25, 2025
1b4eac3
Auto merge of #140298 - matthiaskrgr:rollup-5tc1gvb, r=matthiaskrgr
bors Apr 25, 2025
9349309
Update `extern` docs for Rust 2024 and add safety remarks
t5kd Apr 23, 2025
ab60d5d
Merge from rustc
Apr 26, 2025
3c1612b
Rollup merge of #139865 - m-ou-se:stabilize-proc-macro-span-location,…
matthiaskrgr Apr 26, 2025
5a44b09
Rollup merge of #140216 - t5kd:master, r=tgross35
matthiaskrgr Apr 26, 2025
b5d3cd1
Grammar fixes for BufRead::has_data_left docs
ethanwu10 Apr 26, 2025
80a43e4
uefi: Update r-efi
Ayush1325 Mar 20, 2025
e4ebca5
Rollup merge of #140325 - ethanwu10:ethanwu10/grammar-fixes-for-bufre…
matthiaskrgr Apr 26, 2025
9467ac2
Update example to use `CStr::to_string_lossy`
shepmaster Apr 25, 2025
792361c
docs: fix incorrect stability markers on `std::{todo, matches}`
notriddle Apr 26, 2025
97cc89f
add generic Atomic<T> type alias
CAD97 Sep 19, 2024
a567402
use generic Atomic type where possible
CAD97 Sep 19, 2024
a803bfa
name ATOMIC_INIT without unstable alias
CAD97 Sep 22, 2024
9761788
Remove `#[doc(hidden)]` from `AtomicPrimitive::AtomicInner`
GrigorenkoPV Jan 30, 2025
7cc358c
fix missing doc in CString::from_raw and str::from_boxed_utf8_unchecked
DiuDiu777 Feb 27, 2025
6579c38
specify explicit safety guidance for from_utf8_unchecked
DiuDiu777 Apr 27, 2025
10de28d
Rollup merge of #137439 - clarfonthey:c-str-module, r=tgross35
matthiaskrgr Apr 27, 2025
ce09107
Rollup merge of #137714 - DiuDiu777:doc-fix, r=tgross35
matthiaskrgr Apr 27, 2025
128fe65
Rollup merge of #139031 - DaniPopes:str-trim-closure, r=tgross35
matthiaskrgr Apr 27, 2025
f0ecad7
Rollup merge of #139090 - yotamofek:pr/peekable-next-if-docs, r=tgross35
matthiaskrgr Apr 27, 2025
5f5e35e
Rollup merge of #140297 - shepmaster:cstr-lossy, r=joboet
matthiaskrgr Apr 27, 2025
a35e907
Fix SGX library code implicit auto-ref
Urgau Apr 27, 2025
e39f110
Add `Arc::is_unique`
SabrinaJewson Mar 25, 2025
ca37418
Use `feature(target_has_reliable_f16_f128)` in library tests
tgross35 Apr 26, 2025
8458ab1
Streamline the `format` macro.
nnethercote Apr 23, 2025
598fcd1
Rollup merge of #138737 - Ayush1325:r-efi-update, r=tgross35
ChrisDenton Apr 28, 2025
eab92b2
Rollup merge of #138939 - SabrinaJewson:arc-is-unique, r=tgross35
ChrisDenton Apr 28, 2025
1fb7813
Rollup merge of #139224 - epage:nocapture, r=thomcc
ChrisDenton Apr 28, 2025
dcc26ee
Rollup merge of #139546 - lolbinarycat:std-set_permissions-75942, r=t…
ChrisDenton Apr 28, 2025
5484586
Rollup merge of #140351 - rust-lang:notriddle/stability-use, r=thomcc
ChrisDenton Apr 28, 2025
8286c40
Rollup merge of #140359 - DiuDiu777:str-fix, r=Noratrieb
ChrisDenton Apr 28, 2025
9639a38
Auto merge of #136316 - GrigorenkoPV:generic_atomic, r=Mark-Simulacrum
bors Apr 28, 2025
7d5108c
Auto merge of #123239 - Urgau:dangerous_implicit_autorefs, r=jdonszel…
bors Apr 28, 2025
8a6bb70
AsyncDrop implementation using shim codegen of async_drop_in_place::{…
azhogin Aug 26, 2024
d94c0a4
Rename sub_ptr to offset_from_unsigned in docs
DaniPopes Apr 28, 2025
6c871da
Auto merge of #123948 - azhogin:azhogin/async-drop, r=oli-obk
bors Apr 28, 2025
530f7d5
Remove backticks from `ShouldPanic::YesWithMessage`'s `TrFailedMsg`
ShE3py Apr 28, 2025
b887acd
Rollup merge of #139656 - scottmcm:stabilize-slice-as-chunks, r=dtolnay
ChrisDenton Apr 28, 2025
5b13f30
Rollup merge of #140323 - tgross35:cfg-unstable-float, r=Urgau
ChrisDenton Apr 28, 2025
ca6fbc2
Rollup merge of #140391 - DaniPopes:sub-ptr-rename, r=RalfJung
ChrisDenton Apr 28, 2025
f78f626
unwind: bump `unwinding` dependency to 0.2.6
xobs Apr 29, 2025
b6ef13c
Merge from rustc
Apr 29, 2025
aaa9f9e
Rollup merge of #140422 - betrusted-io:bump-unwinding-to-0.2.6, r=wor…
tgross35 Apr 29, 2025
b8f55d5
Auto merge of #140474 - tgross35:rollup-rdkao89, r=tgross35
bors Apr 29, 2025
654a955
mention provenance in the pointer::wrapping_offset docs
lolbinarycat Mar 31, 2025
89bc2d6
Auto merge of #140188 - nnethercote:streamline-format-macro, r=cuviper
bors Apr 30, 2025
913e16a
Rollup merge of #136160 - ShE3py:should-panic-backticks, r=thomcc
matthiaskrgr Apr 30, 2025
e3e899b
Rollup merge of #139192 - lolbinarycat:docs-wrapping_offset-provenanc…
matthiaskrgr Apr 30, 2025
686897f
Rollup merge of #139624 - m-ou-se:unconst-format-args, r=jhpratt
matthiaskrgr Apr 30, 2025
991ba2a
Rename `(Mapped)(RwLock|Mutex)Guard::try_map` to `filter_map`.
zachs18 May 1, 2025
a19b4be
Make internal `OsString::truncate` and `extend_from_slice` unsafe
thaliaarchi Apr 11, 2025
c174be0
Avoid redundant WTF-8 checks in `PathBuf`
thaliaarchi Apr 22, 2025
10a0adc
Move core::fmt::Arguments::new_v1* to rt.rs.
m-ou-se May 1, 2025
1cc16ba
Clean up "const" situation in format_args!().
m-ou-se May 1, 2025
4fdeed6
Stabilize `select_unpredictable`
Amanieu May 1, 2025
33f0f74
Update stdarch
sayantn Apr 29, 2025
23eed4d
Simplify docs for breaking out of a named code block
ktnlvr May 1, 2025
340edf2
Use present indicative tense in std::io::pipe() API docs
ebkalderon May 1, 2025
38df2df
Rollup merge of #138703 - pudongair:master, r=workingjubilee
GuillaumeGomez May 1, 2025
98920cb
Rollup merge of #139186 - TDecking:float, r=workingjubilee
GuillaumeGomez May 1, 2025
c3aa8fc
Rollup merge of #139780 - ongardie:iterator-take-by_ref-example, r=wo…
GuillaumeGomez May 1, 2025
939bc3f
Rollup merge of #139802 - Lee-Janggun:fix-allocate-hyperlink, r=worki…
GuillaumeGomez May 1, 2025
afbda63
Rollup merge of #140034 - RalfJung:simd_select_bitmask-padding, r=wor…
GuillaumeGomez May 1, 2025
ab9548b
Rollup merge of #140062 - xizheyin:issue-139958, r=workingjubilee
GuillaumeGomez May 1, 2025
953c75d
Rollup merge of #140544 - m-ou-se:format-args-const-cleanup, r=fee1-dead
GuillaumeGomez May 1, 2025
d5876fb
Delegate to inner `vec::IntoIter` from `env::ArgsOs`
thaliaarchi Apr 12, 2025
1897fba
Amend language regarding the never type
Lynnesbian May 2, 2025
a247689
Change signature of File::try_lock and File::try_lock_shared
cberner Apr 4, 2025
dd52495
Implement error::Error for TryLockError
cberner Apr 6, 2025
bf1cf00
Rollup merge of #139206 - joboet:unique_thread_errno, r=ibraheemdev
Zalathar May 2, 2025
6100659
Rollup merge of #139608 - Lynnesbian:improve-async-block-docs, r=ibra…
Zalathar May 2, 2025
c57bcbb
Rollup merge of #139847 - thaliaarchi:args/delegate-iter, r=workingju…
Zalathar May 2, 2025
226afe7
Rollup merge of #140159 - thaliaarchi:pathbuf-extension, r=workingjub…
Zalathar May 2, 2025
06b6dda
Rollup merge of #140197 - ktnlvr:master, r=workingjubilee
Zalathar May 2, 2025
6def11f
Rollup merge of #140389 - sayantn:avx512fp16, r=Amanieu
Zalathar May 2, 2025
06a8821
doc(std): fix typo lchown -> lchmod
lolbinarycat May 2, 2025
6174cf9
Rollup merge of #140536 - zachs18:mapped-guard-filter-map, r=Amanieu
matthiaskrgr May 2, 2025
baa9d74
Rollup merge of #140550 - Amanieu:stabilize_select_unpredictable, r=w…
matthiaskrgr May 2, 2025
4606a19
Rollup merge of #139343 - cberner:filelock_wouldblock, r=workingjubilee
matthiaskrgr May 3, 2025
a83fc6e
Rollup merge of #140564 - ebkalderon:use-present-indicative-in-std-io…
matthiaskrgr May 3, 2025
794e274
Rollup merge of #140595 - lolbinarycat:std-set_permissions-typo, r=cu…
matthiaskrgr May 3, 2025
b0411d4
Merge from 2e6882ac5be27a73293d6f7ae56397fdf32848de with conflicts
May 10, 2025
a2486bd
Update toolchain to 2025-05-06
May 10, 2025
74532dc
Update Kani version to 670d1d1492d51ea2f2aac246bd1965debff75b0e
May 10, 2025
d8deefa
Resolve conflicts
tautschnig May 11, 2025
cff05e2
update stdarch
carolynzech May 15, 2025
82f4412
Merge branch 'main' into sync-2025-05-06
tautschnig May 15, 2025
634ea93
Increase timeout to 10 minutes
tautschnig May 18, 2025
4fc868e
Add temporary workaround for new Kani version
tautschnig May 18, 2025
0af6a86
update stdarch
carolynzech May 15, 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/kani.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
--exclude-pattern time::Duration::from_secs_f \
--include-pattern unicode::unicode_data::conversions::to_ \
--exclude-pattern ::precondition_check \
--harness-timeout 5m \
--harness-timeout 10m \
--default-unwind 1000 \
--jobs=3 --output-format=terse

Expand Down
12 changes: 6 additions & 6 deletions library/Cargo.lock

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

2 changes: 1 addition & 1 deletion library/alloc/src/collections/btree/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub struct Iter<'a, T: 'a> {
#[stable(feature = "collection_debug", since = "1.17.0")]
impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("Iter").field(&self.iter.clone()).finish()
f.debug_tuple("Iter").field(&self.iter).finish()
}
}

Expand Down
13 changes: 10 additions & 3 deletions library/alloc/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,14 @@ impl CString {
/// # Safety
///
/// This should only ever be called with a pointer that was earlier
/// obtained by calling [`CString::into_raw`]. Other usage (e.g., trying to take
/// ownership of a string that was allocated by foreign code) is likely to lead
/// to undefined behavior or allocator corruption.
/// obtained by calling [`CString::into_raw`], and the memory it points to must not be accessed
/// through any other pointer during the lifetime of reconstructed `CString`.
/// Other usage (e.g., trying to take ownership of a string that was allocated by foreign code)
/// is likely to lead to undefined behavior or allocator corruption.
///
/// This function does not validate ownership of the raw pointer's memory.
/// A double-free may occur if the function is called twice on the same raw pointer.
/// Additionally, the caller must ensure the pointer is not dangling.
///
/// It should be noted that the length isn't just "recomputed," but that
/// the recomputed length must match the original length from the
Expand Down Expand Up @@ -818,6 +823,7 @@ impl From<Vec<NonZero<u8>>> for CString {
}
}

#[stable(feature = "c_string_from_str", since = "1.85.0")]
impl FromStr for CString {
type Err = NulError;

Expand All @@ -830,6 +836,7 @@ impl FromStr for CString {
}
}

#[stable(feature = "c_string_from_str", since = "1.85.0")]
impl TryFrom<CString> for String {
type Error = IntoStringError;

Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,5 @@ pub use self::c_str::CString;
#[stable(feature = "alloc_c_string", since = "1.64.0")]
pub use self::c_str::{FromVecWithNulError, IntoStringError, NulError};

#[unstable(feature = "c_str_module", issue = "112134")]
#[stable(feature = "c_str_module", since = "CURRENT_RUSTC_VERSION")]
pub mod c_str;
1 change: 1 addition & 0 deletions library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
#![feature(fmt_internals)]
#![feature(fn_traits)]
#![feature(formatting_options)]
#![feature(generic_atomic)]
#![feature(hasher_prefixfree_extras)]
#![feature(inplace_iteration)]
#![feature(iter_advance_by)]
Expand Down
3 changes: 1 addition & 2 deletions library/alloc/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ macro_rules! vec {
macro_rules! format {
($($arg:tt)*) => {
$crate::__export::must_use({
let res = $crate::fmt::format($crate::__export::format_args!($($arg)*));
res
$crate::fmt::format($crate::__export::format_args!($($arg)*))
})
}
}
4 changes: 4 additions & 0 deletions library/alloc/src/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ impl str {
/// Converts a boxed slice of bytes to a boxed string slice without checking
/// that the string contains valid UTF-8.
///
/// # Safety
///
/// * The provided bytes must contain a valid UTF-8 sequence.
///
/// # Examples
///
/// ```
Expand Down
2 changes: 2 additions & 0 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,7 @@ impl String {
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
#[rustc_confusables("length", "size")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
pub const fn len(&self) -> usize {
self.vec.len()
}
Expand All @@ -1851,6 +1852,7 @@ impl String {
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
#[cfg_attr(not(bootstrap), rustc_no_implicit_autorefs)]
pub const fn is_empty(&self) -> bool {
self.len() == 0
}
Expand Down
79 changes: 66 additions & 13 deletions library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use core::pin::{Pin, PinCoerceUnsized};
use core::ptr::{self, NonNull};
#[cfg(not(no_global_oom_handling))]
use core::slice::from_raw_parts_mut;
use core::sync::atomic;
use core::sync::atomic::Ordering::{Acquire, Relaxed, Release};
use core::sync::atomic::{self, Atomic};
use core::{borrow, fmt, hint};

#[cfg(not(no_global_oom_handling))]
Expand Down Expand Up @@ -369,12 +369,12 @@ impl<T: ?Sized, A: Allocator> fmt::Debug for Weak<T, A> {
// inner types.
#[repr(C)]
struct ArcInner<T: ?Sized> {
strong: atomic::AtomicUsize,
strong: Atomic<usize>,

// the value usize::MAX acts as a sentinel for temporarily "locking" the
// ability to upgrade weak pointers or downgrade strong ones; this is used
// to avoid races in `make_mut` and `get_mut`.
weak: atomic::AtomicUsize,
weak: Atomic<usize>,

data: T,
}
Expand Down Expand Up @@ -2446,7 +2446,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
#[inline]
#[stable(feature = "arc_unique", since = "1.4.0")]
pub fn get_mut(this: &mut Self) -> Option<&mut T> {
if this.is_unique() {
if Self::is_unique(this) {
// This unsafety is ok because we're guaranteed that the pointer
// returned is the *only* pointer that will ever be returned to T. Our
// reference count is guaranteed to be 1 at this point, and we required
Expand Down Expand Up @@ -2526,28 +2526,81 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
unsafe { &mut (*this.ptr.as_ptr()).data }
}

/// Determine whether this is the unique reference (including weak refs) to
/// the underlying data.
/// Determine whether this is the unique reference to the underlying data.
///
/// Note that this requires locking the weak ref count.
fn is_unique(&mut self) -> bool {
/// Returns `true` if there are no other `Arc` or [`Weak`] pointers to the same allocation;
/// returns `false` otherwise.
///
/// If this function returns `true`, then is guaranteed to be safe to call [`get_mut_unchecked`]
/// on this `Arc`, so long as no clones occur in between.
///
/// # Examples
///
/// ```
/// #![feature(arc_is_unique)]
///
/// use std::sync::Arc;
///
/// let x = Arc::new(3);
/// assert!(Arc::is_unique(&x));
///
/// let y = Arc::clone(&x);
/// assert!(!Arc::is_unique(&x));
/// drop(y);
///
/// // Weak references also count, because they could be upgraded at any time.
/// let z = Arc::downgrade(&x);
/// assert!(!Arc::is_unique(&x));
/// ```
///
/// # Pointer invalidation
///
/// This function will always return the same value as `Arc::get_mut(arc).is_some()`. However,
/// unlike that operation it does not produce any mutable references to the underlying data,
/// meaning no pointers to the data inside the `Arc` are invalidated by the call. Thus, the
/// following code is valid, even though it would be UB if it used `Arc::get_mut`:
///
/// ```
/// #![feature(arc_is_unique)]
///
/// use std::sync::Arc;
///
/// let arc = Arc::new(5);
/// let pointer: *const i32 = &*arc;
/// assert!(Arc::is_unique(&arc));
/// assert_eq!(unsafe { *pointer }, 5);
/// ```
///
/// # Atomic orderings
///
/// Concurrent drops to other `Arc` pointers to the same allocation will synchronize with this
/// call - that is, this call performs an `Acquire` operation on the underlying strong and weak
/// ref counts. This ensures that calling `get_mut_unchecked` is safe.
///
/// Note that this operation requires locking the weak ref count, so concurrent calls to
/// `downgrade` may spin-loop for a short period of time.
///
/// [`get_mut_unchecked`]: Self::get_mut_unchecked
#[inline]
#[unstable(feature = "arc_is_unique", issue = "138938")]
pub fn is_unique(this: &Self) -> bool {
// lock the weak pointer count if we appear to be the sole weak pointer
// holder.
//
// The acquire label here ensures a happens-before relationship with any
// writes to `strong` (in particular in `Weak::upgrade`) prior to decrements
// of the `weak` count (via `Weak::drop`, which uses release). If the upgraded
// weak ref was never dropped, the CAS here will fail so we do not care to synchronize.
if self.inner().weak.compare_exchange(1, usize::MAX, Acquire, Relaxed).is_ok() {
if this.inner().weak.compare_exchange(1, usize::MAX, Acquire, Relaxed).is_ok() {
// This needs to be an `Acquire` to synchronize with the decrement of the `strong`
// counter in `drop` -- the only access that happens when any but the last reference
// is being dropped.
let unique = self.inner().strong.load(Acquire) == 1;
let unique = this.inner().strong.load(Acquire) == 1;

// The release write here synchronizes with a read in `downgrade`,
// effectively preventing the above read of `strong` from happening
// after the write.
self.inner().weak.store(1, Release); // release the lock
this.inner().weak.store(1, Release); // release the lock
unique
} else {
false
Expand Down Expand Up @@ -2760,8 +2813,8 @@ impl<T, A: Allocator> Weak<T, A> {
/// Helper type to allow accessing the reference counts without
/// making any assertions about the data field.
struct WeakInner<'a> {
weak: &'a atomic::AtomicUsize,
strong: &'a atomic::AtomicUsize,
weak: &'a Atomic<usize>,
strong: &'a Atomic<usize>,
}

impl<T: ?Sized> Weak<T> {
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/vec/into_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl<T, A: Allocator> IntoIter<T, A> {

// SAFETY: This allocation originally came from a `Vec`, so it passes
// all those checks. We have `this.buf` ≤ `this.ptr` ≤ `this.end`,
// so the `sub_ptr`s below cannot wrap, and will produce a well-formed
// so the `offset_from_unsigned`s below cannot wrap, and will produce a well-formed
// range. `end` ≤ `buf + cap`, so the range will be in-bounds.
// Taking `alloc` is ok because nothing else is going to look at it,
// since our `Drop` impl isn't going to run so there's no more code.
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2588,7 +2588,7 @@ impl<T, A: Allocator> Vec<T, A> {
#[inline]
#[track_caller]
unsafe fn append_elements(&mut self, other: *const [T]) {
let count = unsafe { (*other).len() };
let count = other.len();
self.reserve(count);
let len = self.len();
unsafe { ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) };
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/vec/splice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl<I: Iterator, A: Allocator> Drop for Splice<'_, I, A> {
// and moving things into the final place.
// Which means we can replace the slice::Iter with pointers that won't point to deallocated
// memory, so that Drain::drop is still allowed to call iter.len(), otherwise it would break
// the ptr.sub_ptr contract.
// the ptr.offset_from_unsigned contract.
self.drain.iter = (&[]).iter();

unsafe {
Expand Down
1 change: 1 addition & 0 deletions library/alloctests/tests/fmt.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![deny(warnings)]
// FIXME(static_mut_refs): Do not allow `static_mut_refs` lint
#![allow(static_mut_refs)]
#![cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]

use std::cell::RefCell;
use std::fmt::{self, Write};
Expand Down
1 change: 0 additions & 1 deletion library/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ level = "warn"
check-cfg = [
'cfg(bootstrap)',
'cfg(no_fp_fmt_parse)',
'cfg(stdarch_intel_sde)',
# core use #[path] imports to portable-simd `core_simd` crate
# and to stdarch `core_arch` crate which messes-up with Cargo list
# of declared features, we therefor expect any feature cfg
Expand Down
6 changes: 4 additions & 2 deletions library/core/src/alloc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl fmt::Display for AllocError {
/// # Safety
///
/// Memory blocks that are [*currently allocated*] by an allocator,
/// must point to valid memory, and retain their validity while until either:
/// must point to valid memory, and retain their validity until either:
/// - the memory block is deallocated, or
/// - the allocator is dropped.
///
Expand All @@ -112,7 +112,9 @@ pub unsafe trait Allocator {
///
/// The returned block of memory remains valid as long as it is [*currently allocated*] and the shorter of:
/// - the borrow-checker lifetime of the allocator type itself.
/// - as long as at the allocator and all its clones has not been dropped.
/// - as long as the allocator and all its clones have not been dropped.
///
/// [*currently allocated*]: #currently-allocated-memory
///
/// # Errors
///
Expand Down
4 changes: 1 addition & 3 deletions library/core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,16 +549,14 @@ impl<T: Copy> Cell<T> {
/// # Examples
///
/// ```
/// #![feature(cell_update)]
///
/// use std::cell::Cell;
///
/// let c = Cell::new(5);
/// c.update(|x| x + 1);
/// assert_eq!(c.get(), 6);
/// ```
#[inline]
#[unstable(feature = "cell_update", issue = "50186")]
#[stable(feature = "cell_update", since = "CURRENT_RUSTC_VERSION")]
pub fn update(&self, f: impl FnOnce(T) -> T) {
let old = self.get();
self.set(f(old));
Expand Down
2 changes: 2 additions & 0 deletions library/core/src/char/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub(super) const fn from_u32(i: u32) -> Option<char> {
/// Converts a `u32` to a `char`, ignoring validity. See [`char::from_u32_unchecked`].
#[inline]
#[must_use]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
#[requires(char_try_from_u32(i).is_ok())]
#[ensures(|result| *result as u32 == i)]
pub(super) const unsafe fn from_u32_unchecked(i: u32) -> char {
Expand Down Expand Up @@ -227,6 +228,7 @@ impl FromStr for char {
}

#[inline]
#[cfg_attr(not(bootstrap), allow(unnecessary_transmutes))]
const fn char_try_from_u32(i: u32) -> Result<char, CharTryFromError> {
// This is an optimized version of the check
// (i > MAX as u32) || (i >= 0xD800 && i <= 0xDFFF),
Expand Down
5 changes: 3 additions & 2 deletions library/core/src/ffi/c_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ use crate::{fmt, ops, slice, str};
///
/// fn my_string_safe() -> String {
/// let cstr = unsafe { CStr::from_ptr(my_string()) };
/// // Get copy-on-write Cow<'_, str>, then guarantee a freshly-owned String allocation
/// String::from_utf8_lossy(cstr.to_bytes()).to_string()
/// // Get a copy-on-write Cow<'_, str>, then extract the
/// // allocated String (or allocate a fresh one if needed).
/// cstr.to_string_lossy().into_owned()
/// }
///
/// println!("string: {}", my_string_safe());
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub use self::c_str::FromBytesUntilNulError;
pub use self::c_str::FromBytesWithNulError;
use crate::fmt;

#[unstable(feature = "c_str_module", issue = "112134")]
#[stable(feature = "c_str_module", since = "CURRENT_RUSTC_VERSION")]
pub mod c_str;

#[unstable(
Expand Down
Loading
Loading