-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Branching this from #60302.
Originally, mod.rs for rustc_typeck::check was over 6,000 lines. I was able to push that to around 1,100 lines (PR #76906).
However, in the process, I found that FnCtxt was rather long, with 13 fields in the struct and some rather long impls attached. The sum total is 3,200 lines, which effectively means that the // ignore-tidy-filelength comment was moved from mod.rs to fn_ctxt.rs.
The goal of this issue is to
- Make
fn_ctxt.rssmaller, at minimum less than 3,000 lines by - Moving some of its functionality into "sub-structs" that will be in separate files
Unknowns to solve:
- How do the 13 fields group into nice sub-structs
- What to name the above mentioned sub-structs
- How to achieve this refactoring without changing the interface of
FnCtxt
Solution: Cannot do
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.