Skip to content

Rollup of 15 pull requests#159316

Merged
rust-bors[bot] merged 37 commits into
rust-lang:mainfrom
jhpratt:rollup-Ap3QBGh
Jul 15, 2026
Merged

Rollup of 15 pull requests#159316
rust-bors[bot] merged 37 commits into
rust-lang:mainfrom
jhpratt:rollup-Ap3QBGh

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 15, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

mejrs and others added 30 commits July 5, 2026 15:11
Previously, the lint might suggested using interior mutable type even if
it the compiler already decides that the referenced type is interior
mutable, while it didn't give such suggestion when the referenced type is
considered non-interior mutable. This commit refined the logic as follow:
if the referenced type is not interior mutable, then suggests using types
with interior mutability; otherwise, suggests removing `mut` if the
reference is a *shared* reference. Note that in the latter case, compiler
might be silent if the span of the `static mut` definition is not
appropriate for suggestions (e.g., comes from macro expansion).
For cases like `&a` or `&mut a`, we only leave a subdiagnostic to suggest
user to use raw borrow operators. Using raw pointers in such cases are
also equally viable solution but it's not appropriate to suggest using
interior mutable types at the same time.
The "can also not" phrasing was slightly awkward, so rephrase this sentence.
Document the built-in `inline` attribute in the standard library using the
`#[doc(attribute = "...")]` mechanism, following the existing `must_use`
attribute documentation.
```
error: lifetime may not live long enough
  --> $DIR/higher-ranked-return.rs:11:46
   |
LL |           let x = async move |x: &str| -> &str {
   |  ________________________________-________-____^
   | |                                |        |
   | |                                |        let's call the lifetime of this reference `'2`
   | |                                let's call the lifetime of this reference `'1`
LL | |             x
LL | |         };
   | |_________^ returning this value requires that `'1` must outlive `'2`
```

instead of

```
error: lifetime may not live long enough
  --> $DIR/higher-ranked-return.rs:11:46
   |
LL |           let x = async move |x: &str| -> &str {
   |  ________________________________-________----_^
   | |                                |        |
   | |                                |        return type of async closure `{async closure body@$DIR/higher-ranked-return.rs:11:46: 13:10}` contains a lifetime `'2`
   | |                                let's call the lifetime of this reference `'1`
LL | |             x
LL | |         };
   | |_________^ returning this value requires that `'1` must outlive `'2`
```
GetSystemInfo reports only the primary processor group's CPU count. Before
Windows 11 and Windows Server 2022 a process was confined to one group by
default, so that count matched what it could use; since then processes span
all groups by default, so it can undercount the parallelism available.
* add rustc_no_writable no mem::forget and structs it uses
* rename test file
* apply #[rustc_no_writable] to transmute_prefix and transmute_neo
Co-authored-by: Gwen Mittertreiner <gmtr@google.com>
…=Mark-Simulacrum

Add 1.97.1 release notes

This is a forward port of the release notes that landed on the stable branch. We need this on main for triagebot's GitHub release to happen as expected.

r? me
…ge, r=nia-e

Implement `VecDeque::truncate_to_range`

Tracking issue: rust-lang#156215
Implement `#[diagnostic::opaque]` attribute to hide backtraces of macros.

r? @estebank

There are some more places where we can use this, for example https://github.com/rust-lang/rust/blob/345632878cffcb4c8e90750e943296b43d16c76e/compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs#L623-L639 but those turned out to be a little complicated so are left for followup prs.

Tracking issue: rust-lang#158813
Fix static_mut_refs lint check logic

This PR fixes issue rust-lang#158735.

Previously, the lint might suggested using interior mutable type even if it the compiler already decides that the referenced type is interior mutable, while it didn't give such suggestion when the referenced type is considered non-interior mutable. This commit refined the logic as follow: if the referenced type is not interior mutable, then suggests using types with interior mutability; otherwise, suggests removing `mut` if the reference is a *shared* reference. Note that in the latter case, compiler might be silent if the span of the `static mut` definition is not appropriate for suggestions (e.g., comes from macro expansion).

r? @RalfJung
…ion_parent, r=petrochenkov

resolve: Inherit eager invocation parents

Fixes rust-lang#159233

`format!` eagerly expands its first arg. In this case that path ran into a glob delegation from `fn_delegation`, and resolver tried to read `invocation_parents[invoc_id]` for an eager invocation that never went through reduced-graph collection. So a bad input got an ICE instead of normal errors.

This makes eager invocations copy `InvocationParent` from the eager expansion root, matching the parent-scope fallback already there. imo this is the right place to fix it: idk of a cleaner split where the scope and parent def do not drift apart. fyi the UI regression is the reported case, btw, and it still emits the expected user-facing errors without the panic.
…ngjubilee

Account for async closures when pointing at lifetime in return type

```
error: lifetime may not live long enough
  --> $DIR/higher-ranked-return.rs:11:46
   |
LL |           let x = async move |x: &str| -> &str {
   |  ________________________________-________-____^
   | |                                |        |
   | |                                |        let's call the lifetime of this reference `'2`
   | |                                let's call the lifetime of this reference `'1`
LL | |             x
LL | |         };
   | |_________^ returning this value requires that `'1` must outlive `'2`
```

instead of

```
error: lifetime may not live long enough
  --> $DIR/higher-ranked-return.rs:11:46
   |
LL |           let x = async move |x: &str| -> &str {
   |  ________________________________-________----_^
   | |                                |        |
   | |                                |        return type of async closure `{async closure body@$DIR/higher-ranked-return.rs:11:46: 13:10}` contains a lifetime `'2`
   | |                                let's call the lifetime of this reference `'1`
LL | |             x
LL | |         };
   | |_________^ returning this value requires that `'1` must outlive `'2`
```
…ingjubilee

cleanup: upstream dropped AMX-TF32

LLVM recently dropped x86 AMX-TF32 llvm/llvm-project#207673. This is a re-upload of [rust-lang#158910](rust-lang#158910) as the author is out on vacation for this week.

I've also removed the leftover references to amx-tf32 that were missed in the original PR which caused it to fail the roll up.

r? @durin42
… r=GuillaumeGomez

Add documentation for the `inline` attribute

Document the built-in `inline` attribute in the standard library using the `#[doc(attribute = "...")]` mechanism, following rust-lang#157957 (`must_use`).

Part of rust-lang#157604

r? @GuillaumeGomez

Tested with `./x test library/std --doc --test-args attribute_docs`.
@rustbot rustbot added T-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jul 15, 2026
@jhpratt

jhpratt commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=6 note=ahead of release notes, which is included

@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-*

@rust-bors

rust-bors Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b016514 has been approved by jhpratt

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 15, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 15, 2026
Rollup of 15 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-*
@jhpratt

jhpratt commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@bors p=6 note="ahead of release notes, which is included"

@rust-bors

rust-bors Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: f9b2cc7 (f9b2cc77ecee8a5e0d1956fa58f25ad59416e517)
Base parent: 38a0576 (38a0576951fb5f7209c892b030f40ac166ae86b4)

@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added the merged-by-bors This PR was explicitly merged by bors. label Jul 15, 2026
@rust-bors

rust-bors Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 17m 53s
Pushing 47101ad to main...

@github-actions

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 470556c (parent) -> 47101ad (this PR)

Test differences

Show 733 test diffs

Stage 1

  • [ui (polonius)] tests/ui/delegation/eager-format-glob-delegation-ice-159233.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/diagnostic_namespace/opaque/duplicate.rs: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/diagnostic_namespace/opaque/highlight_maccall.rs#-Zmacro-backtrace: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/diagnostic_namespace/opaque/highlight_maccall.rs#default: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/diagnostic_namespace/opaque/only_point_at_input.rs#-Zmacro-backtrace: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/diagnostic_namespace/opaque/only_point_at_input.rs#default: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/feature-gates/feature-gate-diagnostic-opaque.rs: [missing] -> pass (J0)
  • [rustdoc-html] tests/rustdoc-html/synthetic_auto/issue-159065.rs: [missing] -> pass (J1)
  • [ui] tests/ui/delegation/eager-format-glob-delegation-ice-159233.rs: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/opaque/duplicate.rs: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/opaque/highlight_maccall.rs#-Zmacro-backtrace: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/opaque/highlight_maccall.rs#default: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/opaque/only_point_at_input.rs#-Zmacro-backtrace: [missing] -> pass (J2)
  • [ui] tests/ui/diagnostic_namespace/opaque/only_point_at_input.rs#default: [missing] -> pass (J2)
  • [ui] tests/ui/feature-gates/feature-gate-diagnostic-opaque.rs: [missing] -> pass (J2)
  • vec_deque::truncate_to_range_basic: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_calls_drop: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_end_past_len: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_inclusive_end_overflow: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_kept_in_back: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_kept_in_front: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_kept_straddles: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_leak: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_start_greater_than_end: [missing] -> pass (J4)
  • vec_deque::truncate_to_range_start_past_len: [missing] -> pass (J4)

Stage 2

  • vec_deque::truncate_to_range_basic: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_calls_drop: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_end_past_len: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_inclusive_end_overflow: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_kept_in_back: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_kept_in_front: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_kept_straddles: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_leak: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_start_greater_than_end: [missing] -> pass (J3)
  • vec_deque::truncate_to_range_start_past_len: [missing] -> pass (J3)
  • [rustdoc-html] tests/rustdoc-html/synthetic_auto/issue-159065.rs: [missing] -> pass (J5)
  • [ui] tests/ui/delegation/eager-format-glob-delegation-ice-159233.rs: [missing] -> pass (J6)
  • [ui] tests/ui/diagnostic_namespace/opaque/duplicate.rs: [missing] -> pass (J6)
  • [ui] tests/ui/diagnostic_namespace/opaque/highlight_maccall.rs#-Zmacro-backtrace: [missing] -> pass (J6)
  • [ui] tests/ui/diagnostic_namespace/opaque/highlight_maccall.rs#default: [missing] -> pass (J6)
  • [ui] tests/ui/diagnostic_namespace/opaque/only_point_at_input.rs#-Zmacro-backtrace: [missing] -> pass (J6)
  • [ui] tests/ui/diagnostic_namespace/opaque/only_point_at_input.rs#default: [missing] -> pass (J6)
  • [ui] tests/ui/feature-gates/feature-gate-diagnostic-opaque.rs: [missing] -> pass (J6)

Additionally, 690 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 47101adcea71daee3c2879218f5b883bcdf180aa --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. i686-msvc-2: 1h 29m -> 2h 12m (+47.1%)
  2. pr-check-2: 28m 45s -> 41m 21s (+43.8%)
  3. dist-various-1: 1h 14m -> 45m 24s (-39.0%)
  4. x86_64-gnu-llvm-22-2: 1h 44m -> 1h 7m (-35.1%)
  5. x86_64-gnu: 2h 32m -> 1h 39m (-34.3%)
  6. arm-android: 1h 45m -> 1h 12m (-31.3%)
  7. dist-ohos-armv7: 1h 12m -> 51m 6s (-29.5%)
  8. x86_64-gnu-llvm-21-3: 1h 29m -> 1h 55m (+29.1%)
  9. x86_64-gnu-llvm-21: 1h 1m -> 1h 18m (+28.9%)
  10. dist-armhf-linux: 1h 12m -> 1h 33m (+27.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
#159311 Add 1.97.1 release notes 9167f8d9022211ee59b514bdfc7e8bc2041bc1b4 (link)
#156220 Implement VecDeque::truncate_to_range 2cb229dfe07abb571f1e75b2712101bf3972dc04 (link)
#158608 Implement #[diagnostic::opaque] attribute to hide backtra… 12b2fd09106b30ccf63f55cb8935cba7d062a655 (link)
#159168 Fix static_mut_refs lint check logic 056bd990507e201e16a8e1b818559bfa15d59730 (link)
#159242 resolve: Inherit eager invocation parents 30fa85456930f76167d227e72754bf52d8509c3e (link)
#159256 Account for async closures when pointing at lifetime in ret… afa2df6c9d4eb9c3d4682a692a768f3d1b6b358b (link)
#159310 cleanup: upstream dropped AMX-TF32 575549355d2287e05f130f8c7d6d4ebb9ca9e919 (link)
#158348 Add documentation for the inline attribute 874daa54299c76250f5ce142d7b0053e279b58d8 (link)
#159181 add rustc_no_writable to mem::forget and structs it uses 0bae71244e3c2be090931916e297a75d95326c41 (link)
#159191 Mark PrivateItems with std_internals unstable feature. c4f826907847f68ba835cfc55fb401697201a5f4 (link)
#159194 rustdoc: Fix auto trait normalization env 96b8309de249482e70aa520cebdf8a22f4a6846d (link)
#159196 OnceCell: Improve wording in module docs 66897f1de862159005b95b83604faf725d24813f (link)
#159289 Fix Zulip backport command suggestion 0a1b3e6f56de0d7b12ec92b118e6eaa89b718c6d (link)
#159294 renovate: don't update PRs in the merge queue cb9c3e99d01094eaac60567fc0e11b03579c1269 (link)
#159305 std: clarify available_parallelism docs for Windows 11 proc… 7fb11fd96a90ca5597fc6997541cfdf2b610bcc1 (link)

previous master: 470556c8c1

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

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (47101ad): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.4%, secondary 0.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.4% [0.7%, 4.1%] 2
Regressions ❌
(secondary)
5.6% [2.0%, 9.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.1% [-6.2%, -4.3%] 3
All ❌✅ (primary) 2.4% [0.7%, 4.1%] 2

Cycles

Results (secondary -1.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.4% [-5.4%, -5.4%] 1
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 490.163s -> 491.257s (0.22%)
Artifact size: 389.94 MiB -> 389.43 MiB (-0.13%)

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-meta Area: Issues & PRs about the rust-lang/rust repository itself merged-by-bors This PR was explicitly merged by bors. 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-release Relevant to the release subteam, 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.