Skip to content

Remove skip_norm_w/i/p().def_id with a helper#158620

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Shourya742:2026-06-30-add-early-binder-def-id
Jul 1, 2026
Merged

Remove skip_norm_w/i/p().def_id with a helper#158620
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Shourya742:2026-06-30-add-early-binder-def-id

Conversation

@Shourya742

@Shourya742 Shourya742 commented Jun 30, 2026

Copy link
Copy Markdown
Member

part of #155345

r? @lcnr

…nstantiate_identity().skip_norm_wip().def_id
@rustbot

rustbot commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@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 Jun 30, 2026
Comment on lines +451 to +455
impl<I: Interner> EarlyBinder<I, ty::TraitRef<I>> {
pub fn def_id(&self) -> I::TraitId {
self.value.def_id
}
}

@Shourya742 Shourya742 Jun 30, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added this only for EarlyBinder<TraitRef> because the only current skip_norm_wip().def_id
uses I found were for trait refs. I also did not find an existing trait for “contains a def_id”.

Should this stay narrow, or should I add a small trait so EarlyBinder<T> can expose def_id()
for any T that has one?

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hmm, this does seem like a somewhat useful abstraction, trait HasDefId and then wrappers just impl fn def_id for all T: HasDefId 🤔

I think for now that's probably not worth it, esp as in the trait solver we use different ids depending on what we're dealing with.

You can try doing that for EarlyBinder, Binder, and Unevaluated and see how it looks, but don't know whether it will end up being useful

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will give it a shot locally and see how it looks, and let you know.

@lcnr

lcnr commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

thanks

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📋 Looks like this PR is still in progress, ignoring approval.

Hint: Remove wip from this PR's title when it is ready for review.

@Shourya742

Copy link
Copy Markdown
Member Author

📋 Looks like this PR is still in progress, ignoring approval.

Hint: Remove wip from this PR's title when it is ready for review.

This seems new!! let me change the title

@Shourya742 Shourya742 changed the title Remove skip_norm_wip().def_id with a helper Remove skip_norm_w/i/p().def_id with a helper Jul 1, 2026
@Shourya742

Copy link
Copy Markdown
Member Author

@lcnr might need your approval again.

@lcnr

lcnr commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 03d7851 has been approved by lcnr

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 Jul 1, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 1, 2026
…nder-def-id, r=lcnr

Remove skip_norm_w/i/p().def_id with a helper

part of rust-lang#155345

r? @lcnr
rust-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #158169 (Fix debuginfo compression in bootstrap)
 - #158613 (Fix getrandom fallback test on platforms with `panic=abort`)
 - #158620 (Remove skip_norm_w/i/p().def_id with a helper)
 - #158633 (Remove unnecessary `Clone` derives on resolver types)
 - #158634 (Add missing `needs_drop` check to `DroplessArena`.)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 1, 2026
…nder-def-id, r=lcnr

Remove skip_norm_w/i/p().def_id with a helper

part of rust-lang#155345

r? @lcnr
rust-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #150075 (Implement clamp_to)
 - #158169 (Fix debuginfo compression in bootstrap)
 - #158397 (delegation: support simplest output `Self` mapping)
 - #158613 (Fix getrandom fallback test on platforms with `panic=abort`)
 - #158620 (Remove skip_norm_w/i/p().def_id with a helper)
 - #158633 (Remove unnecessary `Clone` derives on resolver types)
 - #158634 (Add missing `needs_drop` check to `DroplessArena`.)
 - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 1, 2026
…nder-def-id, r=lcnr

Remove skip_norm_w/i/p().def_id with a helper

part of rust-lang#155345

r? @lcnr
rust-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #150075 (Implement clamp_to)
 - #156716 (tests: fix: parallel frontend test failures: different alloc ids)
 - #158397 (delegation: support simplest output `Self` mapping)
 - #158613 (Fix getrandom fallback test on platforms with `panic=abort`)
 - #158620 (Remove skip_norm_w/i/p().def_id with a helper)
 - #158633 (Remove unnecessary `Clone` derives on resolver types)
 - #158634 (Add missing `needs_drop` check to `DroplessArena`.)
 - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
rust-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #158294 (Use .drectve for MSVC DLL exports)
 - #156716 (tests: fix: parallel frontend test failures: different alloc ids)
 - #158397 (delegation: support simplest output `Self` mapping)
 - #158613 (Fix getrandom fallback test on platforms with `panic=abort`)
 - #158620 (Remove skip_norm_w/i/p().def_id with a helper)
 - #158633 (Remove unnecessary `Clone` derives on resolver types)
 - #158634 (Add missing `needs_drop` check to `DroplessArena`.)
 - #158647 (Document `strip_circumfix` behavior on overlapping prefix and suffix.)
@rust-bors rust-bors Bot merged commit 67c06c6 into rust-lang:main Jul 1, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jul 1, 2026
rust-timer added a commit that referenced this pull request Jul 1, 2026
Rollup merge of #158620 - Shourya742:2026-06-30-add-early-binder-def-id, r=lcnr

Remove skip_norm_w/i/p().def_id with a helper

part of #155345

r? @lcnr
@Shourya742 Shourya742 deleted the 2026-06-30-add-early-binder-def-id branch July 2, 2026 07:19
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.

3 participants