Skip to content

Rollup of 12 pull requests#158864

Merged
rust-bors[bot] merged 31 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-re2xAGf
Jul 6, 2026
Merged

Rollup of 12 pull requests#158864
rust-bors[bot] merged 31 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-re2xAGf

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

hkalbasi and others added 30 commits June 25, 2026 03:25
Comments and doc links across std, core, and a process test referenced the
older issue 7 (2018 edition) of the POSIX spec, with one link still on
issue 6. Point them all at the current issue 8 (2024 edition, IEEE Std
1003.1-2024) under onlinepubs/9799919799, and normalize the
`9799919799.2024edition` URL variant to the canonical path.

Links that carry a section anchor were verified against the 2024 edition,
since section numbering shifts between editions:

- Pathname Resolution moved from 4.13 (tag_04_13) to 4.16 (tag_04_16)
- Field Splitting moved from tag_18_06_05 to tag_19_06_05
- LC_CTYPE (tag_07_03_01) was unchanged

CI's linkchecker only validates intra-doc links, not external URLs, so each
page and anchor was checked by hand.
With comparing `sub_unification_table_root_var` you can have an arbitraty
long chain of subtyping relatinships, i.e. a <: b :> c <: d :> e ...,
where all a/b/c/d/e/... get the same sub root var. So it's not necessarily
true that there exists a type that is directly sub/super of the types
compared via `sub_unification_table_root_var`.
As per rust-lang#155114 (comment),
this `From` impl no longer guarantees panicking for exhausted iterators.
Instead, it only guarantees that the conversion will either panic or
produce an empty range.

This is done so that we can optimize the implementation of
`legacy::RangeInclusive` in a way such that we cannot check if it has
been exhausted in a generic context without a `Step` and/or `PartialOrd`
bound.
the old solver doesn't register `TypeOutlives` and `RegionOutlives` goals if `ignoring_regions` is set. The new solver always registers these requirements, so we instead ignore errors caused by these constraints.
Co-Authored-By: Clar Fon <15850505+clarfonthey@users.noreply.github.com>
Used to work around `Cursor` not being a fundamental type when implementing `Write` for `Cursor<Vec<u8>>` and other `alloc` types once `Cursor` and `Write` are both located in `core`.
* add regression test for deprecated note on inlined reexport chain
* resolve deprecated-note links from the owning reexport
* add a comment to regression test
…h726

enable eager `param_env` norm in new solver

https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/goodbye.20proper.20param_env.20normalization/near/594260464

Slightly unfortunate that this is what we ended up with. but for now, this fixes issues and landing the new solver with this is certainly not worse than keeping the old impl.

This PR only eagerly normalizes, it does not *yet* treat aliases in `param_env` candidates as rigid, which is the worse part of this change.

fixes rust-lang/trait-system-refactor-initiative#265
fixes rust-lang#136661

r? @BoxyUwU
…_cursor, r=clarfonthey

Add `std::io::cursor::WriteThroughCursor`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527

## Description

Used to work around `Cursor` not being a fundamental type when implementing `Write` for `Cursor<Vec<u8>>` and other `alloc` types once `Cursor` and `Write` are both located in `core`. Please refer to rust-lang#156527 for further context.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
…fonthey

Move `std::io::Seek` to `core::io`

ACP: rust-lang/libs-team#755
Tracking issue: rust-lang#154046
Split From: rust-lang#156527
Blocked On: rust-lang#158539

## Description

Moves `std::io::Seek` and `SeekFrom` to `core::io`. This is a pretty simple migration, but it is blocked by rust-lang#158539.

---

## Notes

* No AI tooling of any kind was used during the creation of this PR.
* Please see rust-lang#154046 (comment) for a review order and broader context for this PR.
consider subtyping when checking if an infer var is sized

That is, when checking if an inference variable (say `?0`) is sized, with this PR, we now check for obligations like `?1: Sized`, where `?0` and `?1` are transitively related via subtyping (previously we were checking for `?0 = ?1`). This is sound because subtyping cannot change sized-ness.

This fixes the 4-th point/issue from rust-lang#155924. Specifically, it makes this code compile:

```rust
fn blah(e: !) {
    let source = Box::new(e);
    let _: Box<dyn Send> = source;
}
```

This also fixes `tests/ui/impl-trait/unsized_coercion.rs` on new solver, see rust-lang#157820 (comment).

r? types
…on, r=Darksonn

Update POSIX edition links

Comments that reference https://pubs.opengroup.org point to issue 7 (the 2018 edition of IEEE Std 1003.1-2017), with one link still on the older issue 6. The latest issue is 8 (the 2024 edition, IEEE Std 1003.1-2024). From https://www.opengroup.org/austin/papers/posix_faq.html:

> Q3. What is the latest version of POSIX.1?
>
> The 1003.1-2024 standard was published in June 2024. The standard is
> formally known as: IEEE Std 1003.1-2024 The Open Group Technical
> Standard Base Specifications, Issue 8

Issue 8 lives at https://pubs.opengroup.org/onlinepubs/9799919799/.

This PR points all older-edition links to issue 8.

Most links are a straight edition bump, but links with a section anchor needed their anchor rechecked, because section numbering shifts between editions. Verified against the 2024 edition:

- Pathname Resolution moved from 4.13 (`tag_04_13`) to 4.16 (`tag_04_16`)
- Field Splitting moved from `tag_18_06_05` to `tag_19_06_05`
- LC_CTYPE (`tag_07_03_01`) was unchanged

The Miri changes (`src/tools/miri/`) are kept in a separate commit since that's a synced subtree. I'm happy to move them to a `rust-lang/miri` PR if preferred.
…yukang

Fix typo for link on nto-qnx.md

Just a quick fix for a typo in nto-qnx.md that stopped the link from working.
Better error message when bare type in impl parameter list

Fixes rust-lang#147889

Marking this PR ready for feedback on this problem.

The approach I'm trying is to create a snapshot parser and attempt to re-parse the input in another way. If it succeeds, we successfully predicted the user's intention and emit the related help message. If it fails, we cancel the errors produced during the attempt and report the original error.

The problem is that parse functions may internally recover from parse failures and emit errors directly, which means we can't cancel them later. I saw that we have a `recovery` field to control the recovery mechanism, but it seems there are (maybe) a lot of places in the parser that don't check the recovery field before doing their recovery logic.

Should we always use `look_ahead` instead of using a snapshot parser and calling another parse function?
…estion-cast-never-type, r=davidtwco

Emit a suggestion to cast the never type into a concrete type when it fails to satisfy an `impl Trait` bound

Fixes rust-lang#157923
Expose debug scope of statement and terminator in rustc_public

Currently, `scope` is exposed for variables, but it is a meaningless number since the boundary of each scope is not available. This PR changes `span` fields of statement and terminator to `source_info` which includes scope as well.

Disclaimer: Written by LLM
…avidtwco

rustc_target: Add ARMv8-M related target features

This adds the following unstable target features to `feature(arm_target_feature)` (tracking issue: rust-lang#150246):

- `acquire-release`: Armv8 atomic instructions
- `v6m`: Armv6-M instructions (implies `v6`)
- `v8m`: Armv8-M baseline instructions (implies `v6m`)
- `v8m.main`: Armv8-M mainline instructions (implies `v7`)
- `v8.1m.main`: Armv8.1-M mainline instructions (implies `v8m.main`)
- `mve`: M-Profile Vector Extension (Helium) for integer ops (implies `v8.1m.main`, `dsp`, and `fpregs`)
- `mve.fp`: MVE for integer & float ops (implies `mve`)

The target feature names match with [definitions in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-22.1.8/llvm/lib/Target/ARM/ARMFeatures.td#L597-L741). The dependencies should also match those in LLVM, unless there is no corresponding feature in Rust.

This also adds `mve` to vector ABI check and resolve this comment.
https://github.com/rust-lang/rust/blob/973ad0d0ab149bde2e96422833c1265c7a5be217/compiler/rustc_target/src/target_features.rs#L1076-L1078

One of the motivations for adding this: In LLVM, the `v8` target feature is not enabled for ARMv8-M targets, and `v8m`/`v8m.main` is enabled instead, so currently there is no way to detect ARMv8-M from target features.

```console
$ rustc +nightly --print cfg --target thumbv8m.main-none-eabihf | grep target_feature
target_feature="fpregs"
target_feature="mclass"
target_feature="thumb-mode"
target_feature="thumb2"
target_feature="v5te"
target_feature="v6"
target_feature="v6k"
target_feature="v6t2"
target_feature="v7"
```

r? @davidtwco
cc @jonathanpallant

@rustbot label +O-arm +A-target-feature
…=JohnTitor

Weaken guarantee for `From<legacy::RangeInclusive> for RangeInclusive`

As per rust-lang#155114 (comment), this `From` impl no longer guarantees panicking for exhausted iterators. Instead, it only guarantees that the conversion will either panic or produce an empty range.

This is done so that we can optimize the implementation of `legacy::RangeInclusive` in a way such that we cannot check if it has been exhausted in a generic context without a `Step` and/or `PartialOrd` bound.

If this PR and/or rust-lang#155114 merges after the 1.98.0 beta branch promotion from the main branch, then this will need a beta backport, since this PR changes the stable guarantee previously made in rust-lang#155421.

This PR conflicts with and/or blocks rust-lang#155114.
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 6, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 68dfc1d has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 6, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 6, 2026
Rollup of 12 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-bors

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
...............................F.................. (50/144)
.................................................. (100/144)
............................................       (144/144)

======== tests/rustdoc-gui/go-to-collapsed-elem.goml ========

[ERROR] line 40
    at `tests/rustdoc-gui/go-to-collapsed-elem.goml` line 21: Error: Node is detached from document: for command `click: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']"`
    at <file:///checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/test_docs/struct.Foo.html?search=t_use>


<= doc-ui tests done: 143 succeeded, 1 failed, 0 filtered out

Error: ()

@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: fda5521 (fda55213e9b45c31522320137ec4e9024d284137)
Base parent: 3c00c96 (3c00c96d3af4d5b5e101e56cc161a608b21366ee)

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 6, 2026
@rust-bors

rust-bors Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: JonathanBrouwer
Duration: 3h 17m 54s
Pushing 36714a9 to main...

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3c00c96 (parent) -> 36714a9 (this PR)

Test differences

Show 232 test diffs

Stage 1

  • [ui (polonius)] tests/ui/impl-trait/return-never-type.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/parser/bare-type-in-impl-parameter.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/sized/infer_var_subtyping.rs#current: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/sized/infer_var_subtyping.rs#next: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/next-solver/normalize/param_env-region-constraints-ambiguity.rs#current: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/next-solver/normalize/param_env-region-constraints-ambiguity.rs#next: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-1.rs#current: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-1.rs#next: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-2.rs#current: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-2.rs#next: [missing] -> pass (J0)
  • [ui] tests/ui/impl-trait/return-never-type.rs: [missing] -> pass (J1)
  • [ui] tests/ui/parser/bare-type-in-impl-parameter.rs: [missing] -> pass (J1)
  • [ui] tests/ui/sized/infer_var_subtyping.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/sized/infer_var_subtyping.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/normalize/param_env-region-constraints-ambiguity.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/traits/next-solver/normalize/param_env-region-constraints-ambiguity.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-1.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-1.rs#next: [missing] -> pass (J1)
  • [ui] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-2.rs#current: [missing] -> pass (J1)
  • [ui] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-2.rs#next: [missing] -> pass (J1)
  • [crashes] tests/crashes/136661.rs: pass -> [missing] (J3)
  • [ui] tests/rustdoc-ui/intra-doc/deprecated-note-from-inlined-reexport-chain.rs: [missing] -> pass (J3)

Stage 2

  • [ui] tests/ui/impl-trait/return-never-type.rs: [missing] -> pass (J2)
  • [ui] tests/ui/parser/bare-type-in-impl-parameter.rs: [missing] -> pass (J2)
  • [ui] tests/ui/sized/infer_var_subtyping.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/sized/infer_var_subtyping.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/normalize/param_env-region-constraints-ambiguity.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/traits/next-solver/normalize/param_env-region-constraints-ambiguity.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-1.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-1.rs#next: [missing] -> pass (J2)
  • [ui] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-2.rs#current: [missing] -> pass (J2)
  • [ui] tests/ui/traits/normalize/normalize-param-env-missing-implied-bound-2.rs#next: [missing] -> pass (J2)
  • [ui] tests/rustdoc-ui/intra-doc/deprecated-note-from-inlined-reexport-chain.rs: [missing] -> pass (J4)
  • [crashes] tests/crashes/136661.rs: pass -> [missing] (J5)

Additionally, 198 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 36714a9983d6ba11203d8bb87a1b372247fbcf06 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-arm-linux-musl: 59m 13s -> 1h 39m (+68.7%)
  2. dist-x86_64-apple: 1h 22m -> 1h 53m (+36.8%)
  3. x86_64-msvc-1: 2h -> 2h 42m (+35.1%)
  4. x86_64-gnu-tools: 50m 30s -> 1h 7m (+34.1%)
  5. dist-aarch64-apple: 1h 31m -> 1h 56m (+27.0%)
  6. dist-x86_64-msvc: 1h 35m -> 2h (+26.6%)
  7. dist-x86_64-llvm-mingw: 2h 4m -> 1h 33m (-24.5%)
  8. x86_64-gnu-llvm-21-2: 1h 42m -> 1h 17m (-24.4%)
  9. dist-x86_64-solaris: 1h 15m -> 1h 33m (+24.0%)
  10. dist-sparcv9-solaris: 1h 33m -> 1h 11m (-23.9%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#156976 enable eager param_env norm in new solver 5d29849fbd1a3e4567fc723df1ea89d376338b1a (link)
#158537 Add std::io::cursor::WriteThroughCursor 99d99762f165c61ee79f1496d5e1e07eaf6870f0 (link)
#158540 Move std::io::Seek to core::io 896be214e9630dcb19e16a23f99067905562be73 (link)
#157820 consider subtyping when checking if an infer var is sized c173b3be2d446fa6fe1d02b6875c58954809f0c0 (link)
#158505 Update POSIX edition links 79345c56f929a3e9cce697cc73346abc80a0bfcd (link)
#158853 Fix typo for link on nto-qnx.md dcfe446ac10fb3ac8cf9b5738eeefd06fbdae93c (link)
#157466 Better error message when bare type in impl parameter list aed2da51c782bbf590c0ea8b413c7f85cc813676 (link)
#157966 Emit a suggestion to cast the never type into a concrete ty… f7b8674ea0a88137dc8d89fef44ecfab357db634 (link)
#158381 Expose debug scope of statement and terminator in rustc_pub… 8648755aa41617ce7e6cd30a1ccc334215426043 (link)
#158405 rustc_target: Add ARMv8-M related target features d4b9bca9243b2db69d1b82e374cde96669ec016b (link)
#158770 Weaken guarantee for `Fromlegacy::RangeInclusive for Rang… e3386ce7e45eaaf7ba8a303be747aad32b1ac604 (link)
#158820 Fix rustdoc ICE on deprecated note in inlined re-export cha… d503e23a45013b843112edc53a7c3033b4d35441 (link)

previous master: 3c00c96d3a

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.