Skip to content

ty::Alias: replace def_id: did with def_id#155063

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
josetorrs:refactor-alias-free
Apr 12, 2026
Merged

ty::Alias: replace def_id: did with def_id#155063
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
josetorrs:refactor-alias-free

Conversation

@josetorrs
Copy link
Copy Markdown
Contributor

@josetorrs josetorrs commented Apr 9, 2026

View all comments

related issue: #154941

tackling this task:

  • replace def_id: did with def_id where possible

r? @WaffleLapkin

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

rustbot commented Apr 9, 2026

WaffleLapkin is not on the review rotation at the moment.
They may take a while to respond.

@josetorrs josetorrs marked this pull request as ready for review April 9, 2026 20:23
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 9, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 9, 2026

HIR ty lowering was modified

cc @fmease

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 9, 2026
Copy link
Copy Markdown
Contributor

@WilliamTakeshi WilliamTakeshi left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! Just a small feedback

View changes since this review

// Skips type aliases, as they are meant to be transparent.
// FIXME(type_alias_impl_trait): can we require mentioning nested type aliases explicitly?
ty::Alias(alias_ty @ ty::AliasTy { kind: ty::Free { def_id }, .. })
ty::Alias(ty::AliasTy { kind: ty::Free { def_id }, args, .. })
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.

I think the original issue calls for args: alias_ty_args. Using just args feels too broad.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated this: 0efed12

Comment on lines +213 to +219
ty::Alias(ty::AliasTy { kind: ty::Free { def_id }, args: alias_ty_args, .. })
if let Some(def_id) = def_id.as_local() =>
{
if !self.seen.insert(def_id) {
return;
}
self.tcx.type_of(def_id).instantiate(self.tcx, alias_ty.args).visit_with(self);
self.tcx.type_of(def_id).instantiate(self.tcx, alias_ty_args).visit_with(self);
Copy link
Copy Markdown
Member

@WaffleLapkin WaffleLapkin Apr 11, 2026

Choose a reason for hiding this comment

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

View changes since the review

I would rather not split work of changing name @ ty::AliasTy per kind. #154941 already handles all of them (I think?) so please revert this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 11, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 11, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@josetorrs
Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 11, 2026
@WaffleLapkin WaffleLapkin changed the title rename local parameter, refactor ty::Free ty::Alias: replace def_id: did with def_id Apr 11, 2026
@WaffleLapkin
Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 11, 2026

📌 Commit e18f23b has been approved by WaffleLapkin

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 Apr 11, 2026
@WaffleLapkin
Copy link
Copy Markdown
Member

@bors r-

Actually, let's squash commits first.

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 11, 2026
@WaffleLapkin
Copy link
Copy Markdown
Member

@bors squash msg=ty::Alias: replace def_id: did with def_id

@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 11, 2026

🔨 4 commits were squashed into 53bf1ee.

@rust-bors rust-bors bot force-pushed the refactor-alias-free branch from e18f23b to 53bf1ee Compare April 11, 2026 17:29
@WaffleLapkin
Copy link
Copy Markdown
Member

Hm. Let's try to set the commit message again...

@bors squash msg="ty::Alias: replace def_id: did with def_id"

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 11, 2026

❗ The PR has only one commit.

@josetorrs
Copy link
Copy Markdown
Contributor Author

I think the backticks ( ` ) made the commit message a little odd

@WaffleLapkin
Copy link
Copy Markdown
Member

@josetorrs since bors isn't cooperating could you try renaming the commit instead? ^^' (you need to fetch the commit that bors squashed first)

@josetorrs josetorrs force-pushed the refactor-alias-free branch from 53bf1ee to ec582d5 Compare April 11, 2026 18:00
@josetorrs
Copy link
Copy Markdown
Contributor Author

@WaffleLapkin should be good now

@WaffleLapkin
Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 11, 2026

📌 Commit ec582d5 has been approved by WaffleLapkin

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 11, 2026
rust-bors bot pushed a commit that referenced this pull request Apr 11, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #155057 (Update libc to v0.2.184)
 - #154967 (Test(lib/sync): Fix `test_rwlock_max_readers` for x86 Win7)
 - #154994 (don't leak internal temporaries from `dbg!`)
 - #155130 (Stabilize feature `isolate_most_least_significant_one`)
 - #154925 (Make Box/Rc/Arc::into_array allocator-aware (and add doctest))
 - #155063 (`ty::Alias`: replace `def_id: did` with `def_id`)
rust-bors bot pushed a commit that referenced this pull request Apr 12, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #155057 (Update libc to v0.2.184)
 - #154967 (Test(lib/sync): Fix `test_rwlock_max_readers` for x86 Win7)
 - #154994 (don't leak internal temporaries from `dbg!`)
 - #155130 (Stabilize feature `isolate_most_least_significant_one`)
 - #154925 (Make Box/Rc/Arc::into_array allocator-aware (and add doctest))
 - #155063 (`ty::Alias`: replace `def_id: did` with `def_id`)
@rust-bors rust-bors bot merged commit 58ca4df into rust-lang:main Apr 12, 2026
11 checks passed
rust-timer added a commit that referenced this pull request Apr 12, 2026
Rollup merge of #155063 - josetorrs:refactor-alias-free, r=WaffleLapkin

`ty::Alias`: replace `def_id: did` with `def_id`

related issue: #154941

tackling this task:

- [x] replace def_id: did with def_id where possible

r? @WaffleLapkin
@rustbot rustbot added this to the 1.97.0 milestone Apr 12, 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