Skip to content

Conversation

@joshua-spacetime
Copy link
Collaborator

@joshua-spacetime joshua-spacetime commented Oct 20, 2025

Description of Changes

Adds rust-src to the toolchain and updates the expected output of the trybuild tests.

rust-src places the entire source code of the rust stdlib under the local toolchain directory. rust-analyzer uses it for "go to definition" (among other things) in the stdlib. When included in the toolchain, rustc can provide code frames that it can't otherwise.

The reason for its addition is that if anyone includes it in their local toolchain, the error messages produced by rustc when running the ui tests will be slightly different (have some more information) than when run in CI. Hence those tests will fail locally but not in CI. Rather than removing rust-src locally so that the tests will pass, I've opted to just add it to the toolchain so that everyone runs with it by default, including in CI.

API and ABI breaking changes

None

Expected complexity level and risk

0

Testing

  • Updated rustc tests

Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updated description. This now LGTM

@joshua-spacetime joshua-spacetime added this pull request to the merge queue Oct 21, 2025
Merged via the queue into master with commit c724a4e Oct 21, 2025
29 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/add-rust-src-to-toolchain branch October 21, 2025 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants