Commit Graph

327342 Commits

Author SHA1 Message Date
Ralf Jung c1f7fa1a48 Merge pull request #5053 from WhySoBad/network-socket-test-fill-buffer-windows
Fix skipping TCP write buffer filling on Windows hosts
2026-05-24 20:08:22 +00:00
Ralf Jung 102df46fb3 Merge pull request #5054 from WhySoBad/network-socket-fix-deallocate-tmp-buffer-readv
Fix deallocating temporary buffer on failed `readv`
2026-05-24 19:29:14 +00:00
WhySoBad cebc29f482 fix: deallocate temporary buffer on failed readv 2026-05-24 21:01:30 +02:00
Ralf Jung 678ef5a1b6 Merge pull request #5055 from quiode/patch-1
as_mut_ptr test update description
2026-05-24 18:30:28 +00:00
Dominik Schwaiger 30b942df98 as_mut_ptr test update description
Updates the description in the `tests/fail/tree_borrows/implicit_writes/as_mut_ptr.rs` test. The referenced file no longer exists.

Co-authored-by: Ralf Jung <post@ralfj.de>
2026-05-24 19:59:28 +02:00
Ben Kimock 9a681abd85 Merge pull request #4964 from saethlin/support-no-core
Support running no_core Linux programs
2026-05-24 14:31:44 +00:00
Ben Kimock da3727f193 Support running no_core Linux programs
Co-authored-by: Ralf Jung <post@ralfj.de>
2026-05-24 09:53:29 -04:00
Ralf Jung 6d8947ee90 Merge pull request #5061 from RalfJung/endian
restrict vendor intrinsics to little-endian targets
2026-05-24 07:39:32 +00:00
Ralf Jung d4a8031c1f restrict vendor intrinsics to little-endian targets 2026-05-24 09:09:50 +02:00
Ralf Jung b06adbf96f Merge pull request #5052 from rust-lang/rustup-2026-05-20
Automatic Rustup
2026-05-20 14:51:02 +00:00
WhySoBad d4406dde64 fix: enable filling up write buffer on Windows hosts 2026-05-20 08:35:26 +02:00
The Miri Cronjob Bot 873c7f03d1 Merge ref '1f8e04d34ab0' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@1f8e04d34a
Filtered ref: rust-lang/miri@455eb046a3
Upstream diff: https://github.com/rust-lang/rust/compare/281c97c3240a9abd984ca0c6a2cd7389115e80d5...1f8e04d34ab0c1fd9574840aa6db670e41593bfb

This merge was created using https://github.com/rust-lang/josh-sync.
2026-05-20 06:22:00 +00:00
The Miri Cronjob Bot 1c4042bc61 Prepare for merging from rust-lang/rust
This updates the rust-version file to 1f8e04d34a.
2026-05-20 06:13:28 +00:00
bors 1f8e04d34a Auto merge of #156727 - abdul2801:docs, r=GuillaumeGomez
Fix jump-to-def links broken by turbofish syntax

Fixes rust-lang/rust#156706
2026-05-20 02:37:03 +00:00
bors 4b9792692f Auto merge of #156589 - cuviper:revert-dbg-tearing, r=the8472
Revert tearing changes to `dbg!`

Since the primary change to `dbg!` in rust-lang/rust#149869, we've been chasing a few regressions:

* rust-lang/rust#153850, fixed by rust-lang/rust#154074
* rust-lang/rust#154988, fixed by rust-lang/rust#154994
* rust-lang/rust#155902, proposed fix in rust-lang/rust#155915

We already reverted this once, on beta only to prevent these regressions from shipping in 1.95.

In that most recent PR, we decided that it would be better to revert `dbg!` to its original state everywhere (`main` and 1.96-`beta`), and then we can consider it from scratch later. So here I've reverted the change and its fixes, but kept the regression tests, including the pending one.

cc @joboet @dianne @rust-lang/libs 
@rustbot label beta-nominated
2026-05-19 23:24:13 +00:00
bors e50aa6fba4 Auto merge of #153640 - Zalathar:subchunk, r=wesleywiser
Make bitset `would_modify_words` more vectorizer-friendly



Currently this function compares a single pair of `u64` at a time, which is potentially slower than comparing multiple words before each early-exit check, especially for the large chunks used by ChunkedBitSet.

Perf shows a notable improvement in `cranelift-codegen`, which is the one benchmark that is known to stress these code paths.

- Incorporates https://github.com/rust-lang/rust/pull/153759.
2026-05-19 20:02:33 +00:00
bors 1ea1171c1e Auto merge of #156751 - JonathanBrouwer:rollup-jecv0TQ, r=JonathanBrouwer
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#154265 (ci: Add dist-aarch64-freebsd)
 - rust-lang/rust#156739 (miri subtree update)
 - rust-lang/rust#148666 (Add support for xray in aarch64 unknown none targets)
 - rust-lang/rust#156547 (Move tests closures)
 - rust-lang/rust#156578 (Add FileCheck for build_correct_coerce)
 - rust-lang/rust#156734 ([rustdoc] Move `span_map` file to the right folder)
2026-05-19 16:31:39 +00:00
abdul2801 afedb8727e Update turbofish.rs 2026-05-19 19:29:13 +05:30
Ralf Jung facda40a8b Merge pull request #5049 from RalfJung/set-last-error-and-return
rename set_last_error_and_return helper to make it clear what we return
2026-05-19 13:38:32 +00:00
Ralf Jung 7dd6d8b17c rename set_last_error_and_return helper to make it clear what we return 2026-05-19 15:09:48 +02:00
Jonathan Brouwer f3d44a0113 Rollup merge of #156734 - GuillaumeGomez:move-span_map, r=yotamofek
[rustdoc] Move `span_map` file to the right folder

This file should at the same level as `highlight.rs` and `macro_expansion.rs` as it doesn't do anything in `render`.

r? @yotamofek
2026-05-19 15:04:45 +02:00
Jonathan Brouwer 3a0c6e932c Rollup merge of #156578 - eval-exec:mir-opt-build-correct-coerce-filecheck, r=TaKO8Ki
Add FileCheck for build_correct_coerce

part of rust-lang/rust#116971
2026-05-19 15:04:44 +02:00
Jonathan Brouwer 9283c8e59b Rollup merge of #156547 - danieljofficial:move-tests-closures, r=adwinwhite
Move tests closures

Hi, I have moved a few closures related tests. Please review them when you can find the time. This is a part of [133895](https://github.com/rust-lang/rust/issues/133895)
2026-05-19 15:04:43 +02:00
Jonathan Brouwer 93e516b3e9 Rollup merge of #148666 - odlot:master, r=wesleywiser
Add support for xray in aarch64 unknown none targets

I am currently working on an embedded project and use the target `aarch64-unknown-none`, which I want to profile.
I found the following compiler flag `-Z instrument-xray` (https://doc.rust-lang.org/unstable-book/compiler-flags/instrument-xray.html) available and I locally built a toolchain that sets the `supports_xray: true` option in `TargetOptions` for `compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs`.
Using this toolchain in `rustup` I am able to use the instrumentation pass and I verified that the disassembly looks as what I want.
I understand that it isn't available upstream while being supported due to the separate runtime library which has to be linked (e.g., https://www.llvm.org/docs/XRay.html#xray-runtime-library), which is not available for `aarch64-unknown-none`.
I argue that someone who cross-compiles for `aarch64-unknown-none` would be okay with writing a separate runtime library themselves, which I intend to do.
As far as I understood it is not necessarily required to have a runtime library at this point, i.e., the user of this API should link it, e.g., from their `build.rs` file using `cargo::rustc-link-lib=LIB` if there is an XRay LIB available for the respective target, e.g., `clang+llvm-19.1.1-aarch64-linux-gnu/lib/clang/19/lib/aarch64-unknown-linux-gnu/libclang_rt.xray-fdr.a` (which afaik there isn't for `aarch64-unknown-none`) and do "configuration as code" of XRay's options.
It should not be part of the compiler, because the instrumentation and the runtime library are completely decoupled. One can modify the instrumented code by the compiler pass however one wants to, this again pushes me into the direction of telling the developer to bring his own runtime library.

I would like to bring my change that enables this instrumentation back into upstream to facilitate my developer experience.
2026-05-19 15:04:43 +02:00
Jonathan Brouwer c8cb78d21a Rollup merge of #156739 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to https://github.com/rust-lang/miri/commit/159054c60e08465357ab954745fc27318fad55bf.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-05-19 15:04:42 +02:00
Jonathan Brouwer d14790a404 Rollup merge of #154265 - mrkajetanp:freebsd-aarch64-ci, r=marcoieni
ci: Add dist-aarch64-freebsd

Add scripts to build the aarch64-unknown-freebsd target in CI.
Implements MCP: https://github.com/rust-lang/compiler-team/issues/961

There is currently the issue of FreeBSD version support. See the following thread for more details:
https://github.com/rust-lang/rust/pull/132228

The current version supported by rust is FreeBSD 12, which is already EOL. This means it is no longer possible to download FreeBSD releases from their servers. The aarch64 build is not mirrored on the Rust servers, which is why I couldn't match the version used by already existing CI scripts and had to change this one to FreeBSD 13. FreeBSD 13 itself will be EOL a month from now, on April 30th. We might want to put aarch64 FreeBSD builds on the Rust mirror and update the support across the board to FreeBSD 14 prior to merging this.
2026-05-19 15:04:41 +02:00
Ralf Jung 18311c672b fix running miri test when the working directory is not writable 2026-05-19 14:27:46 +02:00
Abdul Rafey Ahmed c454d92f61 fix: improve turbofish jump-to-def handling
Handle turbofish syntax correctly in rustdoc jump-to-def links
and add regression tests covering type aliases.
2026-05-19 16:20:38 +05:30
bors 60592ad7c6 Auto merge of #156228 - Bryanskiy:eff_vis_iter_late, r=petrochenkov
Privacy: try use queue instead of fixed-point iteration



Earlier: iterate until updates of `EffectiveVisibility` occur.

Now:  if an update occurs, then we put in the queue those items that may be affected by this update. Iterate until there are items in the queue.

r? @petrochenkov
2026-05-19 09:35:38 +00:00
Bryanskiy d143a60611 Privacy: try use queue instead of fixed-point iteration 2026-05-19 11:32:54 +03:00
Ralf Jung 6e9e47daeb Merge pull request #5036 from WhySoBad/network-socket-fix-blocking-connect-err
Fix `connect` of blocking TCP sockets always returning `ENOTCONN` on error
2026-05-19 05:51:57 +00:00
Guillaume Gomez 6c88e90ab1 Move span_map file to the right folder 2026-05-19 01:47:00 +02:00
WhySoBad 79cfca599e Various TCP socket connect fixes
1. Blocking `connect`s which fail no longer only return EINPROGRESS but
   instead return the correct error code.

2. Manually reading SO_ERROR outside of `ensure_connected` no longer
   allows the socket to be upgraded to `Connected` despite the `connect`
   failing.

3. Introduced new `ConnectionFailed` state to disallow actions on
   sockets with a failed `connect`.
2026-05-18 23:42:15 +02:00
bors ca9203f29c Auto merge of #156728 - JonathanBrouwer:rollup-Qv3EfnO, r=JonathanBrouwer
Rollup of 3 pull requests

Successful merges:

 - rust-lang/rust#156146 (test new solver on CI until stabilization)
 - rust-lang/rust#155840 (prefer `T::IS_ZST` over manual check)
 - rust-lang/rust#156723 (Update books)
2026-05-18 21:25:18 +00:00
Jonathan Brouwer 0cb7361374 Rollup merge of #156723 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/reference

9 commits in 581920f9109f141b88b860b3e1e8359e3896a150..ad35aca481751a06afeb23820a672b0f3b11a476
2026-05-14 17:00:42 UTC to 2026-05-04 18:27:13 UTC

- ci: declare contents:read on CI workflow (rust-lang/reference#2271)
- Fix the grammar of generic arguments (rust-lang/reference#2247)
- Rename grammar rule `TypeParamBounds` to just `Bounds` (rust-lang/reference#2258)
- Update `used` to use the attribute template (rust-lang/reference#1905)
- Place HRTB binders before fn qualifiers (rust-lang/reference#2260)
- Glossary: add new entry documenting zero-sized types (rust-lang/reference#2203)
- Fix test failure on macOS with link_section (rust-lang/reference#2246)
- Make definition of fragment specifier `path` more precise (rust-lang/reference#2248)
- gitignore linkcheck (rust-lang/reference#2252)
2026-05-18 23:17:18 +02:00
Jonathan Brouwer 27d3139405 Rollup merge of #155840 - Lars-Schumann:prefer-is-zst, r=clarfonthey
prefer `T::IS_ZST` over manual check

makes the intent clearer and possible small perf improvement
2026-05-18 23:17:17 +02:00
Jonathan Brouwer d42d8e0453 Rollup merge of #156146 - lqd:new-solver-ci-std, r=marcoieni
test new solver on CI until stabilization

We need the new solver to be able to build the stdlib, and this has regressed in the recent past. Things are broken right now, and we want to ensure this keeps working until stabilization later this year.

I've added this to the `x86_64-gnu-llvm-XX` job (note no `-1/2/3` suffix) so it's run on PR and auto CI, and because it's roughly the fastest of these builders, though maybe the aarch64 llvm 1 and 2 are slightly faster.

Building the stage 1 `./x build library/` is generally quite quick, a couple minutes at most.

The new solver fix to build std is from @lcnr [on zulip](https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/weekly.20sync.2Fupdates/near/591998234).
r? @marcoieni
2026-05-18 23:17:16 +02:00
bors 9eb3be26b4 Auto merge of #156720 - JonathanBrouwer:rollup-vArjiS4, r=JonathanBrouwer
Rollup of 13 pull requests

Successful merges:

 - rust-lang/rust#156709 (stdarch subtree update)
 - rust-lang/rust#155006 (stabilize `feature(cfg_target_has_atomic_equal_alignment)`)
 - rust-lang/rust#156444 (Implement `OsStr::split_at`)
 - rust-lang/rust#156582 (Allow `global_asm!` in statement positions)
 - rust-lang/rust#156661 (Remove `UncheckedIterator`)
 - rust-lang/rust#152367 (Derives `Copy` for `ffi::FromBytesUntilNulError`)
 - rust-lang/rust#156443 (Fix invalid suggestion for parenthesized break)
 - rust-lang/rust#156606 (Add pext/pdep as aliases for extract_bits/deposit_bits)
 - rust-lang/rust#156630 (Replace `println!` with `assert!` in HashMap documentation examples)
 - rust-lang/rust#156644 (Widen the result of `widening_mul`.)
 - rust-lang/rust#156653 (Update `sysinfo` version to `0.39.2`)
 - rust-lang/rust#156697 (Add diagnostic items for IoBufReader and StdinLock)
 - rust-lang/rust#156704 (reduce usage of `box_patterns` in tests)
2026-05-18 18:00:20 +00:00
rustbot 8623be7b0e Update books 2026-05-18 19:00:55 +02:00
Jonathan Brouwer 7c3bc86405 Rollup merge of #156704 - cyrgani:unbox-tests, r=mu001999
reduce usage of `box_patterns` in tests

Part of https://github.com/rust-lang/rust/issues/156110.
2026-05-18 17:07:14 +02:00
Jonathan Brouwer 4cce3530bb Rollup merge of #156697 - JaafarTanoukhi:iobufreader-stdinlock-diag-items, r=mejrs
Add diagnostic items for IoBufReader and StdinLock

Added two new diagnostic items for IoBufReader and StdinLock.
2026-05-18 17:07:13 +02:00
Jonathan Brouwer 1056a02f08 Rollup merge of #156653 - GuillaumeGomez:update-sysinfo, r=SimonSapin
Update `sysinfo` version to `0.39.2`

Bugfixes and performance improvements.
2026-05-18 17:07:12 +02:00
Jonathan Brouwer 3605c1f769 Rollup merge of #156644 - bjoernager:widening-mul, r=clarfonthey
Widen the result of `widening_mul`.

Tracking issue: rust-lang/rust#152016

This PR implements <https://github.com/rust-lang/rust/issues/152016#issuecomment-3843258926>, which mandates that `widening_mul` return a single, scalar value rather than a low/high tuple.

Consequently, this method is removed from `u128` and `i128` as they are the widest integral types. It has also been removed from `usize` and `isize` due to portability concerns.

Existing `widening_mul` usage has been replaced by equivalent calls to `carrying_mul` (which is logically identical to the old behaviour.) Existing &ndash; generic &ndash; non-doc tests have been removed.

# Public API

```rust
impl u8 {
    pub const fn widening_mul(self, rhs: Self) -> u16;
}

impl u16 {
    pub const fn widening_mul(self, rhs: Self) -> u32;
}

impl u32 {
    pub const fn widening_mul(self, rhs: Self) -> u64;
}

impl u64 {
    pub const fn widening_mul(self, rhs: Self) -> u128;
}

impl i8 {
    pub const fn widening_mul(self, rhs: Self) -> i16;
}

impl i16 {
    pub const fn widening_mul(self, rhs: Self) -> i32;
}

impl i32 {
    pub const fn widening_mul(self, rhs: Self) -> i64;
}

impl i64 {
    pub const fn widening_mul(self, rhs: Self) -> i128;
}
```
2026-05-18 17:07:11 +02:00
Jonathan Brouwer a26a65252f Rollup merge of #156630 - BowLuckie:main, r=clarfonthey
Replace `println!` with `assert!` in HashMap documentation examples

## Changes
- **`.keys()`**
- **`.values()`**
- **`.values_mut()`**
- **`.iter()`**
- **`.iter_mut()`**
2026-05-18 17:07:11 +02:00
Jonathan Brouwer 9333565661 Rollup merge of #156606 - niklasf:alias-pext-pdep, r=SimonSapin
Add pext/pdep as aliases for extract_bits/deposit_bits

So that the methods will be found when searching for the corresponding intrinsics.

Tracking issue for `extract_bits`/`deposit_bits`: https://github.com/rust-lang/rust/issues/149069
2026-05-18 17:07:10 +02:00
Jonathan Brouwer e7d5c0a9ef Rollup merge of #156443 - el-ev:fix-break-sugg, r=ShoyuVanilla
Fix invalid suggestion for parenthesized break

Resolves rust-lang/rust#156383

The old code incorrectly assumed `e.span` started exactly at the beginning of `break`. Fixed by locating the exact start position of `break`.
2026-05-18 17:07:09 +02:00
Jonathan Brouwer 18bedf4bc6 Rollup merge of #152367 - Conaclos:conaclos/FromBytesUntilNulError-impl-Copy, r=clarfonthey
Derives `Copy` for `ffi::FromBytesUntilNulError`

[`ffi::FromBytesWithNulError` derives `Copy` since Rust 1.93](https://github.com/rust-lang/rust/commit/2f5a3d4b06a0a9e8749c2e361758ec517df0c96a) while `ffi::FromBytesUntilNulError` doesn't.
This Pr fixes that by deriving `Copy` for `ffi::FromBytesUntilNulError`.

I encountered this issue while I was working in a const context.

Note: I couldn't find any documentation about what kind of PR is allowed. As this one is very small, I guess it is ok to submit it directly without opening an issue first?
2026-05-18 17:07:08 +02:00
Jonathan Brouwer 43de103116 Rollup merge of #156661 - theemathas:del-unchecked-iter, r=SimonSapin
Remove `UncheckedIterator`

The only remaining usage of `UncheckedIterator` was in `array::{try_,}from_trusted_iterator`. So, replace `array::repeat` and array's `Clone` impl with a manual `from_fn` call rather than going through unnecessary abstractions, and remove the `UncheckedIterator` trait.
2026-05-18 17:07:07 +02:00
Jonathan Brouwer 59eda84e03 Rollup merge of #156582 - daxpedda:global-asm-statement, r=petrochenkov
Allow `global_asm!` in statement positions

This PR makes it possible to put `global_asm!` in statement positions. This is particularly useful for proc-macros, where you otherwise have to wrap them in `mod foo { global_asm!(...); }`.

I'm happy to open an ACP first (or a design meeting?).
I would also assume this needs sign-off from the lang-team?

Previously discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/216763-project-inline-asm/topic/Item.20position.20global_asm/with/581784943).

r? @Amanieu
2026-05-18 17:07:06 +02:00
Jonathan Brouwer a6138ec142 Rollup merge of #156444 - ChrisDenton:os_str_split_at, r=nia-e
Implement `OsStr::split_at`

See rust-lang/rust#156199

This allows splitting only on valid UTF-8 boundaries, regardless of the platform, which avoids cross-platform landmines.
2026-05-18 17:07:05 +02:00