Skip to content

Clean up the API for opening/checking incremental-compilation files #154410

Open
Zalathar wants to merge 2 commits intorust-lang:mainfrom
Zalathar:open-incremental-file
Open

Clean up the API for opening/checking incremental-compilation files #154410
Zalathar wants to merge 2 commits intorust-lang:mainfrom
Zalathar:open-incremental-file

Conversation

@Zalathar
Copy link
Member

Returning dedicated structs and enums makes the meaning of each return value more obvious, and provides a more natural home for documentation.

This part of the codebase is fairly crufty, and I doubt anyone feels fully confident about reviewing changes to it, but hopefully these particular cleanups should be fairly straightforward.

I have more changes planned in this area (e.g. cleaning up LoadResult), but I stopped here to make review a bit easier.

Returning dedicated structs and enums makes the meaning of each return value
more obvious, and provides a more natural home for documentation.

The intermediate `load_data` function was unhelpful, and has been inlined into
the main function.
The standard library has helper methods for converting integers to/from
little-endian bytes, for checked conversion from `usize` to `u8`, and for
treating `&mut T` as `&mut [T; 1]`.
@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. labels Mar 26, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 26, 2026

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, incremental
  • compiler, incremental expanded to 69 candidates
  • Random selection from 12 candidates

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

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants