Skip to content

resolve: Module-related refactorings#156406

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
petrochenkov:modata2
May 11, 2026
Merged

resolve: Module-related refactorings#156406
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
petrochenkov:modata2

Conversation

@petrochenkov
Copy link
Copy Markdown
Contributor

Extracted parts of #156362 that don't require splitting (Local,Extern)ModuleData into separate data structures.

  • Some expect_local assertions are added
  • Methods that need to exist on all of Module and (Local,Extern)Module are implemented for ModuleData
  • Methods that need to exist on ModuleKind are moved to ModuleKind
  • Some unnecessary complicated logic using graph_root is simplified
  • glob_importers are filled and used only for local modules.
  • Some unnecessary logic is skipped for extern modules in resolve_ident_in_module_non_globs_unadjusted
  • Module construction functions are cleaned up
  • module_to_string is simplified

r? @nnethercote

@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 May 10, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 10, 2026
@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 10, 2026

☀️ Try build successful (CI)
Build commit: 9c31e24 (9c31e244d359fbff8e190e6fadd18c45a62f08c8, parent: 99eed207b47aca1fec5c665531db8e948a92d0ca)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (9c31e24): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (primary 2.3%, secondary -6.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.9% [-6.9%, -6.9%] 1
All ❌✅ (primary) 2.3% [2.3%, 2.3%] 1

Binary size

Results (secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) - - 0

Bootstrap: 499.454s -> 498.907s (-0.11%)
Artifact size: 397.23 MiB -> 397.20 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 10, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor Author

Perf-neutral.
@bors rollup=maybe

@nnethercote
Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 11, 2026

📌 Commit a07cc54 has been approved by nnethercote

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 May 11, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 11, 2026
resolve: Module-related refactorings

Extracted parts of rust-lang#156362 that don't require splitting `(Local,Extern)ModuleData` into separate data structures.

- Some `expect_local` assertions are added
- Methods that need to exist on all of `Module` and `(Local,Extern)Module` are implemented for `ModuleData`
- Methods that need to exist on `ModuleKind` are moved to `ModuleKind`
- Some unnecessary complicated logic using `graph_root` is simplified
-  `glob_importers` are filled and used only for local modules.
- Some unnecessary logic is skipped for extern modules in `resolve_ident_in_module_non_globs_unadjusted`
- Module construction functions are cleaned up
- `module_to_string` is simplified

r? @nnethercote
rust-bors Bot pushed a commit that referenced this pull request May 11, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #156357 (tests: ip*_properties: avoid parsing the IP over and over again)
 - #156389 (prepare fs tests for miri)
 - #156406 (resolve: Module-related refactorings)
 - #156426 (Fix unwanted "Available on XX-bit only" in libcore integers)
rust-bors Bot pushed a commit that referenced this pull request May 11, 2026
…uwer

Rollup of 4 pull requests

Successful merges:

 - #156357 (tests: ip*_properties: avoid parsing the IP over and over again)
 - #156389 (prepare fs tests for miri)
 - #156406 (resolve: Module-related refactorings)
 - #156426 (Fix unwanted "Available on XX-bit only" in libcore integers)
rust-bors Bot pushed a commit that referenced this pull request May 11, 2026
…uwer

Rollup of 13 pull requests

Successful merges:

 - #156437 (`rust-analyzer` subtree update)
 - #156357 (tests: ip*_properties: avoid parsing the IP over and over again)
 - #156389 (prepare fs tests for miri)
 - #156147 (Update ICU4X to 2.2)
 - #156375 (kernel_copy tests: properly join background threads)
 - #156406 (resolve: Module-related refactorings)
 - #155946 (Refuse to push changes with a dirty git client)
 - #156282 (Update `sysinfo` version to `0.39.0`)
 - #156372 (remove allows_weak_linkage target spec flag)
 - #156384 (Remove some dead code for dumping MIR for a single DefId)
 - #156392 (Improve doc comments for f32::ceil() and f32::floor())
 - #156411 (bootstrap: Don't panic on `x install --set build.extended=true`)
 - #156426 (Fix unwanted "Available on XX-bit only" in libcore integers)
@rust-bors rust-bors Bot merged commit 8880b2c into rust-lang:main May 11, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants