Skip to content

resolve: Evaluate private visibilities eagerly in eff vis computation#156185

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
petrochenkov:queffvis
May 10, 2026
Merged

resolve: Evaluate private visibilities eagerly in eff vis computation#156185
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
petrochenkov:queffvis

Conversation

@petrochenkov
Copy link
Copy Markdown
Contributor

@petrochenkov petrochenkov commented May 5, 2026

It's cheaper to evaluate them now when Declarations keep their parent modules.

View all comments

@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 5, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 5, 2026

r? @folkertdev

rustbot has assigned @folkertdev.
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
  • compiler expanded to 73 candidates
  • Random selection from 19 candidates

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
resolve: Try removing questionable optimizations in eff vis computation
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-perf Status: Waiting on a perf run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 5, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 5, 2026

☀️ Try build successful (CI)
Build commit: b88d160 (b88d160c3a88b6a02a3856463a035a8b334c6f57, parent: 4feb7221f4d445120a5061b16ce7222adbfdf6f6)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (b88d160): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.3% [0.2%, 5.4%] 22
Regressions ❌
(secondary)
1.0% [0.1%, 4.4%] 30
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 8
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.8% [-0.3%, 5.4%] 30

Max RSS (memory usage)

Results (primary 1.7%, 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)
2.6% [1.5%, 3.2%] 4
Regressions ❌
(secondary)
1.2% [1.0%, 1.5%] 3
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 2
All ❌✅ (primary) 1.7% [-2.1%, 3.2%] 5

Cycles

Results (primary 3.5%, secondary 1.1%)

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

mean range count
Regressions ❌
(primary)
4.7% [2.5%, 6.0%] 5
Regressions ❌
(secondary)
2.2% [0.7%, 3.7%] 4
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.4%] 3
All ❌✅ (primary) 3.5% [-2.2%, 6.0%] 6

Binary size

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

Bootstrap: 495.518s -> 495.363s (-0.03%)
Artifact size: 394.42 MiB -> 394.49 MiB (0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 5, 2026
@rustbot

This comment has been minimized.

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

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
resolve: Try removing questionable optimizations in eff vis computation
@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@folkertdev
Copy link
Copy Markdown
Contributor

@rustbot reroll

@rustbot rustbot assigned oli-obk and unassigned folkertdev May 9, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor Author

cc @mu001999

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 9, 2026
resolve: Set correct parent and expansion for `self` declarations

Follow up to rust-lang#146972 and rust-lang#154313.

The `parent` seems to not be used yet, it will ICE if used (rust-lang#156185 uses it).
The `expn_id` is only relevant to macros 2.0, I won't bother coming up with a test.
jhpratt added a commit to jhpratt/rust that referenced this pull request May 9, 2026
resolve: Set correct parent and expansion for `self` declarations

Follow up to rust-lang#146972 and rust-lang#154313.

The `parent` seems to not be used yet, it will ICE if used (rust-lang#156185 uses it).
The `expn_id` is only relevant to macros 2.0, I won't bother coming up with a test.
Comment thread compiler/rustc_resolve/src/effective_visibilities.rs Outdated
Comment thread compiler/rustc_resolve/src/effective_visibilities.rs
@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 10, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

Switched to the second variant from #156185 (comment), it seems to be slightly simpler to reason about.
r? @mu001999

@rustbot rustbot assigned mu001999 and unassigned oli-obk May 10, 2026
@mu001999
Copy link
Copy Markdown
Member

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 10, 2026

📌 Commit cc630bc has been approved by mu001999

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 10, 2026
@matthiaskrgr
Copy link
Copy Markdown
Member

@bors p=5

@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 10, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 10, 2026

☀️ Test successful - CI
Approved by: mu001999
Duration: 3h 13m 1s
Pushing 99eed20 to main...

@rust-bors rust-bors Bot merged commit 99eed20 into rust-lang:main May 10, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing d1961be (parent) -> 99eed20 (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 99eed207b47aca1fec5c665531db8e948a92d0ca --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-rust-for-linux: 34m 45s -> 54m 52s (+57.9%)
  2. i686-msvc-1: 2h 23m -> 2h 59m (+25.1%)
  3. x86_64-gnu: 1h 46m -> 2h 12m (+24.5%)
  4. x86_64-msvc-2: 1h 59m -> 2h 28m (+24.1%)
  5. dist-x86_64-msvc-alt: 2h 11m -> 2h 39m (+21.6%)
  6. dist-ohos-armv7: 1h 14m -> 59m 43s (-20.4%)
  7. pr-check-1: 27m 56s -> 33m 37s (+20.3%)
  8. x86_64-msvc-ext1: 2h 5m -> 1h 40m (-19.9%)
  9. pr-check-2: 38m 6s -> 45m 37s (+19.7%)
  10. dist-arm-linux-musl: 1h 25m -> 1h 42m (+19.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

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

Labels

merged-by-bors This PR was explicitly merged by bors. 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.

8 participants