Skip to content

Rollup of 5 pull requests - #162572

Closed
Zalathar wants to merge 10 commits into
rust-lang:mainfrom
Zalathar:rollup-FCNGMB7
Closed

Rollup of 5 pull requests#162572
Zalathar wants to merge 10 commits into
rust-lang:mainfrom
Zalathar:rollup-FCNGMB7

Conversation

@Zalathar

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

sladyn98 and others added 10 commits June 21, 2026 13:29
…able

When a diagnostic points into the standard library but its source isn't
available locally (e.g. a rustup toolchain without the `rust-src`
component), the emitter can only print the bare remapped path with no
snippet. Emit a one-time `help` suggesting `rustup component add rust-src`
so the next build can show the source.

The hint is shown at most once per compilation (tracked with an
`AtomicBool` on the emitter) and only for remapped std paths. It is added
to both the primary and child-note fallbacks, since std spans usually
appear in child "required by a bound in `core::...`" notes.
…t, r=estebank

Suggest installing `rust-src` when standard library source is unavailable

### Why

  A lot of diagnostics point at a span *inside* the standard library e.g. `required by a bound in `std::iter::Iterator::sum``, or `JoinHandle::join takes ownership of the receiver`. For toolchains installed via `rustup` std is shipped with its paths remapped to `/rustc/<hash>/library/...` and the source itself is **not** included unless the `rust-src` component is installed.

So when an error references std, rustc tries to render that span, can't find the source on disk, and falls back to printing just the bare remapped path with no code:

```
  error[E0277]: a value of type String cannot be made by summing an iterator ...
   --> src/main.rs:2:20
    ...
  note: required by a bound in std::iter::Iterator::sum
   --> /rustc/<hash>/library/core/src/iter/traits/iterator.rs:3669:4
```

For the user this is a dead end: the path doesn't exist locally, there's no surrounding code. It *is* fixable: `rustup component add rust-src` makes the source available, after which the same diagnostic renders the real std snippet. But that capability is
invisible. This PR closes that discoverability gap by suggesting it at exactly  the moment it would help.

Closes rust-lang#156402
…=bjorn3

Put manual calls of Enzyme intrinsics behind a feature gate

r? bjorn3

fixes rust-lang#161820

I created the internal feature gate without a tracking issue. `autodiff` didn’t seem like it was the right one.
…skip, r=jieyouxu

Revert "Skip rustc book on i686"

Reverts rust-lang#158379
This should not be needed anymore since rust-lang#162288 merged
Add regression test for higher-ranked fn pointer trait impl mismatch errors

Closes rust-lang#29061
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Sep 10, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Sep 10, 2026
@Zalathar

Copy link
Copy Markdown
Member Author

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 10180d9 has been approved by Zalathar

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

This comment has been minimized.

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

Successful merges:

 - #158191 (Suggest installing `rust-src` when standard library source is unavailable)
 - #162122 (Put manual calls of Enzyme intrinsics behind a feature gate)
 - #162553 (Revert "Skip rustc book on i686")
 - #162562 (Add regression test for higher-ranked fn pointer trait impl mismatch errors)
 - #162518 (Add a revision for previously fixed solver issue)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
help: if you don't care about this missing field, you can explicitly ignore it
   |
67 -             theme,
68 -         } = self;
67 +             theme, rust_src_hint_shown: _ } = self;
   |
help: or always ignore missing fields here
   |
67 -             theme,
68 -         } = self;

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

rust-bors Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 17d749c failed: CI. Failed job:

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
help: if you don't care about this missing field, you can explicitly ignore it
   |
67 -             theme,
68 -         } = self;
67 +             theme, rust_src_hint_shown: _ } = self;
   |
help: or always ignore missing fields here
   |
67 -             theme,
68 -         } = self;

@Zalathar

Copy link
Copy Markdown
Member Author

Failure was in #158191, which went on to immediately fail its own CI run anyway.

@Zalathar Zalathar closed this Sep 10, 2026
@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 10, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2026
@rust-bors

rust-bors Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@Zalathar
Zalathar deleted the rollup-FCNGMB7 branch September 10, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants