Skip to content

Rollup of 10 pull requests - #162792

Closed
jhpratt wants to merge 25 commits into
rust-lang:mainfrom
jhpratt:rollup-bgGuG9D
Closed

jhpratt wants to merge 25 commits into
rust-lang:mainfrom
jhpratt:rollup-bgGuG9D

Conversation

@jhpratt

@jhpratt jhpratt commented Sep 15, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

KevinA-cpu and others added 25 commits September 2, 2026 23:59
…pture lint

`drop_location_span` assumed that every closure had a valid drop location, which could cause an ICE for closures in unsupported contexts. This changes `drop_location_span` to return `Option<Span>`. If there is no valid drop location, the migration lint is not emitted because its drop-order diagnostic would be misleading. The span is computed before creating `MigrationLint` and stored there so it can be reused for the drop-order labels.
the suggestion rewrote the borrow where it was written. for a borrow coming from a macro body that is the macro definition rather than the call site, and for a macro from another crate a file the user cannot edit. it was machine applicable so rustfix would apply it and a macro invoked at more than one call site could stop compiling.

gate it on can_be_used_for_suggestions so those cases fall through to the existing note that the trait is implemented for the mutable borrow but not the shared one.
Most of them don't need to be public, but there are scenarios where
thing is private on one platform but public on the other, so having a
lint on all the time gets complicated.

Added #![warn(unreachable_pub)] in library/std/src/lib.rs
Added #[allow(unreachable_pub)] on top of std::os and std::sys specifically.
Add regression test for do_not_recommend on a single impl candidate
This reverts commit d4e6b8f.

Reverted commit contains incorrect comments,
does not implement all the functionality it claims to,
and lacks test coverage.
As previously written, AGENTS.md prohibited my LLM from performing edits
as part of a prototype that I never intended to upstream. This is
explicitly permitted by the policy.

Text drafted by Claude Fable 5.1 and edited by me.

Change
[pre-approved](https://rust-lang.zulipchat.com/#narrow/channel/606558-llm-reviews/topic/AGENTS.2Emd.20forbidding.20experimentation/near/624161741) by @jyn514
…2, r=Amanieu

Remove d32 feature from 32-bit Arm targets

Fixes rust-lang#159973

In rust-lang#149512 I removed `-d32` from some specs, but since LLVM enables `neon` by default for v7 targets `d32` was left enabled while it should be optional on this target. For a similar reason `-d32` was removed from some armv6 targets and has been readded.

This PR adds a test to ensure this specific instance does not happen again and has been tested locally on armv7-unknown-linux-gnueabihf, armv7a-none-eabihf and arm-unknown-linux-gnueabihf.

It might be a good idea in general to have a test that runs `--print cfg` and captures the set of rust target features enabled to show when PRs change them, but most of these targets are not run in Rust's CI so it's out of scope for this issue.

For reference, here is the manually-expanded LLVM features and their implications - necessary as these targets rely on a feature from LLVM that Rust doesn't yet expose:

```
vfp4 -> vfp3 + fp16 + vfp4d16 + vfp4sp
vfp4d16 -> vfp3d16 + fp16 + fp64 + vfp4d16sp
vfp4sp -> vfp3sp + fp16 + d32 + vfp4d16sp
vfp4d16sp -> vfp3d16sp + fp16
vfp3 -> vfp2 + vfp3d16 + vfp3sp
vfp3d16 -> vfp2 + fp64 + vfp3d16sp
vfp3sp -> vfp2 + d32 + vfp3d16sp
vfp3d16sp -> vfp2sp
vfp2 -> vfp2sp + fp64
vfp2sp -> fpregs
```
…tebank

Filter do_not_recommend impls before handling a single candidate

Fixed rust-lang#160717: a single candidate could appear in the suggestion despite `do_not_recommend`.
The `if` block now executes only when there is exactly one implementation candidate and that candidate is not marked `do_not_recommend`.
A new test checks both solvers; it fails without the fix and passes with it.
These tests passed:
    - ./x test tests/ui/diagnostic_namespace/do_not_recommend --force-rerun
    - ./x test tests/ui/try-trait --force-rerun
    - ./x test tidy
Used llm for code navigation.
… r=GuillaumeGomez,notriddle

rustdoc: Revert "fix bare urls split text"

This reverts commit d4e6b8f.

Reverted commit contains incorrect comments,
does not implement all the functionality it claims to, and lacks test coverage.

If someone wishes to re-add the functionality, it should be done as postprocessing after the regex match, as regex is not capable of handling arbitrary nesting of matched pairs.  Additionally, future PRs attempting to reinstate this should frame it as a change to a fuzzy heuristic, not as a simple "fix".

r? @GuillaumeGomez
…e, r=Enselic

hir_typeck: Don't ICE on closures without drop location in closure capture lint

Resolves rust-lang#156288.

`drop_location_span` assumed that every closure had a valid drop location, which could cause an ICE for closures in unsupported contexts. This changes `drop_location_span` to return `Option<Span>`. If there is no valid drop location, the migration lint is not emitted because its drop-order diagnostic would be misleading. The span is computed before creating `MigrationLint` and stored there so it can be reused for the drop-order labels.
std: make a lot of items crate private

1. Added `#![warn(unreachable_pub)]` in `library/std/src/lib.rs`
2. Added `#[allow(unreachable_pub)]` on top of `std::os` and `std::sys` specifically.

r? clarfonthey
…s-not-trigger-note-issue-140171, r=chenyukang

Suggest keyword order for `extern "C" const unsafe fn`

closes rust-lang#140171

This implementation does not accurately follow the desired output in the issue as it could introduces a much bigger change, where as the one item suggestion approach is also decently helpful and sufficient already.
…t, r=Urgau

Clean up `test/rustdoc-html` folder by moving tests where appropriate

<del>Gonna likely continue a bit more before assigning a reviewer.</del>

CI is happy and I think it's already big enough for a first batch.

r? ghost
…on-in-macro, r=chenyukang

dont suggest changing the mutability of a borrow that comes from a macro

`suggest_change_mut` has no expansion guard so a borrow written in a macro body gets a `MachineApplicable` help pointing inside the macro or at a file in a dependency. with more than one local call site applying it forces the mutable borrow on every expansion and swaps `E0525` for `E0596`. adds `span.can_be_used_for_suggestions()` to the guard falling through to the existing note.

with a single local call site the suggestion is correct. the span is the defect.

the guard is in the shared helper so it covers all three call sites. full `tests/ui` 21979 passed 0 failed with zero existing baselines re blessed.

r? @chenyukang

cc @davidtwco
… r=Mark-Simulacrum

Fix `path_trailing_sep` methods for Windows verbatim paths

Normally on Windows the path separator is either `\` or `/` but for verbatim paths it is only `\`. Currently the unstable `path_trailing_sep` methods (rust-lang#142503) do not take that into account and just use the general `is_sep_byte` method.

This PR changes it to use the internal `Components::is_sep(self, b)` method that takes into account verbatim paths.
AGENTS.md: Permit local experimentation, per the online policy.

As previously written, AGENTS.md prohibited my LLM from performing edits as part of a prototype that I never intended to upstream. This is explicitly permitted by the policy.

Text drafted by Claude Fable 5.1 and edited by me.

I ran 3 or 4 test sessions with my edits and tweaked it until it performed fairly well. It's still quite strict; it is very adamant that the user makes an explicit statement that they won't be upstreaming.

Change
[pre-approved](https://rust-lang.zulipchat.com/#narrow/channel/606558-llm-reviews/topic/AGENTS.2Emd.20forbidding.20experimentation/near/624161741) by @jyn514

r? @jyn514
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 15, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Sep 15, 2026
@rustbot rustbot added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Sep 15, 2026
@jhpratt

jhpratt commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors

rust-bors Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f32e0ce 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 Sep 15, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 15, 2026
Rollup of 10 pull requests

Successful merges:

 - #160911 (Remove d32 feature from 32-bit Arm targets)
 - #162771 (Filter do_not_recommend impls before handling a single candidate)
 - #162779 (rustdoc: Revert "fix bare urls split text")
 - #161548 (hir_typeck: Don't ICE on closures without drop location in closure capture lint)
 - #161612 (std: make a lot of items crate private)
 - #162204 (Suggest keyword order for `extern "C" const unsafe fn`)
 - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate)
 - #162638 (dont suggest changing the mutability of a borrow that comes from a macro)
 - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths)
 - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-sparcv9-solaris failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] toml_writer test:false 0.357
   Compiling memchr v2.8.1
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.

Session terminated, killing shell...::group::Clock drift check
  local time: Tue Sep 15 05:36:31 UTC 2026
  network time: Tue, 15 Sep 2026 05:36:31 GMT
##[endgroup]
[RUSTC-TIMING] memchr test:false 1.607
 ...killed.

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

rust-bors Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

💔 Test for ae9d6b0 failed: CI. Failed job:

@jhpratt

jhpratt commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

@bors retry

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 15, 2026
Rollup of 10 pull requests

Successful merges:

 - #160911 (Remove d32 feature from 32-bit Arm targets)
 - #162771 (Filter do_not_recommend impls before handling a single candidate)
 - #162779 (rustdoc: Revert "fix bare urls split text")
 - #161548 (hir_typeck: Don't ICE on closures without drop location in closure capture lint)
 - #161612 (std: make a lot of items crate private)
 - #162204 (Suggest keyword order for `extern "C" const unsafe fn`)
 - #162372 (Clean up `test/rustdoc-html` folder by moving tests where appropriate)
 - #162638 (dont suggest changing the mutability of a borrow that comes from a macro)
 - #162643 (Fix `path_trailing_sep` methods for Windows verbatim paths)
 - #162784 (AGENTS.md: Permit local experimentation, per the online policy.)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-various failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_builtin_macros test:false 22.210
[RUSTC-TIMING] rustc_query_impl test:false 40.481
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.

Session terminated, killing shell...::group::Clock drift check
  local time: Tue Sep 15 07:26:04 UTC 2026
  network time: Tue, 15 Sep 2026 07:26:04 GMT
##[endgroup]
 ...killed.
##[error]The operation was canceled.

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

rust-bors Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 8bf9416 failed: CI. Failed job:

@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors retry

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 15, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2026
@rust-bors

rust-bors Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors

rust-bors Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

❗ You can only retry pull requests that are approved and have a previously failed auto build.

Hint: If you wanted to retry pull request CI instead, push the latest commit again, or close and then reopen this PR.

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

Labels

rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. 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.