Skip to content

resolve: Use IdentKey in resolve_ident_in_scope_set#151820

Merged
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
petrochenkov:packhyg3
Feb 2, 2026
Merged

resolve: Use IdentKey in resolve_ident_in_scope_set#151820
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
petrochenkov:packhyg3

Conversation

@petrochenkov
Copy link
Contributor

Follow up to #151550, implements #151550 (comment).

r? @nnethercote

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 29, 2026
@petrochenkov
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 29, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 29, 2026
resolve: Use `IdentKey` in `resolve_ident_in_scope_set`
@petrochenkov petrochenkov removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jan 29, 2026
let scope_set = ScopeSet::All(TypeNS);
self.cm().visit_scopes(scope_set, parent_scope, ctxt, None, |mut this, scope, _, _| {
let ctxt = Macros20NormalizedSyntaxContext::new(sp.ctxt());
self.cm().visit_scopes(scope_set, parent_scope, ctxt, sp, None, |mut this, scope, _, _| {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
self.cm().visit_scopes(scope_set, parent_scope, ctxt, sp, None, |mut this, scope, _, _| {
self.cm().visit_scopes(scope_set, parent_scope, ctxt, orig_ident_span, None, |mut this, scope, _, _| {

Using something longer here messes up the closure's formatting.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 29, 2026

☀️ Try build successful (CI)
Build commit: d11b46d (d11b46de8454e47fa2ec4e588671c9f91f23c93d, parent: 80b898258da78fdd1262438126aa0cf90e395f0c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d11b46d): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.1%] 6
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.2%] 11
All ❌✅ (primary) -0.2% [-0.2%, -0.1%] 6

Max RSS (memory usage)

Results (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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.1%, -1.1%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -2.7%)

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)
-2.7% [-2.8%, -2.6%] 2
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, secondary -0.0%)

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.0% [-0.0%, -0.0%] 4
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 4

Bootstrap: 475.963s -> 473.7s (-0.48%)
Artifact size: 397.82 MiB -> 397.77 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 29, 2026
@petrochenkov petrochenkov marked this pull request as ready for review January 29, 2026 17:28
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 29, 2026
@petrochenkov
Copy link
Contributor Author

Oh, nice.
@rustbot ready

ident.orig(orig_ident_span.with_ctxt(*ident.ctxt)),
&& let Ok(decl) = self.reborrow().resolve_ident_in_scope_set_inner(
ident,
orig_ident_span,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This and the other call to resolve_ident_in_scope_set_inner are the point of the PR.
First, here we avoid a span packing/unpacking on a good path, and second we pass a span that is actually original, rather than "slightly less massaged".

@rustbot

This comment has been minimized.

@petrochenkov
Copy link
Contributor Author

Added one more similar change on top.

@rust-bors

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Jan 31, 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.

@nnethercote
Copy link
Contributor

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 2, 2026

📌 Commit 161fcde 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 Feb 2, 2026
@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 Feb 2, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 2, 2026

☀️ Test successful - CI
Approved by: nnethercote
Duration: 3h 13m 27s
Pushing f60a0f1 to main...

@rust-bors rust-bors bot merged commit f60a0f1 into rust-lang:main Feb 2, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

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 a60d12c (parent) -> f60a0f1 (this PR)

Test differences

Show 28 test diffs

28 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 f60a0f1bcc5a2a6dd8eb2d2021da79b40f5fbae9 --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. pr-check-1: 1621.4s -> 1973.9s (+21.7%)
  2. aarch64-gnu-llvm-20-1: 3222.9s -> 3852.9s (+19.5%)
  3. test-various: 6758.2s -> 7966.1s (+17.9%)
  4. x86_64-rust-for-linux: 2656.2s -> 3101.4s (+16.8%)
  5. aarch64-gnu-debug: 3990.1s -> 4605.9s (+15.4%)
  6. i686-gnu-2: 5249.7s -> 6049.3s (+15.2%)
  7. x86_64-msvc-ext1: 7255.1s -> 8229.1s (+13.4%)
  8. x86_64-gnu-llvm-20-1: 3954.9s -> 4457.7s (+12.7%)
  9. x86_64-gnu-gcc: 3631.3s -> 4089.4s (+12.6%)
  10. i686-gnu-1: 7569.4s -> 8521.7s (+12.6%)
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.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f60a0f1): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 8
Improvements ✅
(secondary)
-0.4% [-0.9%, -0.1%] 22
All ❌✅ (primary) -0.3% [-0.3%, -0.2%] 8

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

Results (primary -2.6%, secondary -3.5%)

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)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
-3.5% [-4.9%, -2.2%] 4
All ❌✅ (primary) -2.6% [-2.6%, -2.6%] 1

Binary size

Results (primary -0.0%, 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.0% [-0.0%, -0.0%] 10
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 5
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 10

Bootstrap: 473.737s -> 470.454s (-0.69%)
Artifact size: 397.70 MiB -> 397.65 MiB (-0.01%)

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.

4 participants