Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove rustc_middle::ty::util::ExplicitSelf. #139041

Merged

Conversation

nnethercote
Copy link
Contributor

It's an old (2017 or earlier) type that describes a self receiver. It's only used in rustc_hir_analysis for two error messages, and much of the complexity isn't used. I suspect it used to be used for more things.

This commit removes it, and moves a greatly simplified version of the determine method into rustc_hir_analysis, renamed as get_self_string. The big comment on the method is removed because it no longer seems relevant.

r? @BoxyUwU

It's an old (2017 or earlier) type that describes a `self` receiver.
It's only used in `rustc_hir_analysis` for two error messages, and much
of the complexity isn't used. I suspect it used to be used for more
things.

This commit removes it, and moves a greatly simplified version of the
`determine` method into `rustc_hir_analysis`, renamed as
`get_self_string`. The big comment on the method is removed because it
no longer seems relevant.
@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 Mar 28, 2025
@BoxyUwU
Copy link
Member

BoxyUwU commented Apr 4, 2025

@bors r+ rollup

nice cleanup :3 thx. The big comment on the original method does indeed seem very out of date

@bors
Copy link
Collaborator

bors commented Apr 4, 2025

📌 Commit 7876836 has been approved by BoxyUwU

It is now in the queue for this repository.

@bors bors 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 4, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2025
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#139041 (Remove `rustc_middle::ty::util::ExplicitSelf`.)
 - rust-lang#139328 (Fix 2024 edition doctest panic output)
 - rust-lang#139339 (unstable book: document tait)
 - rust-lang#139348 (AsyncDestructor: replace fields with impl_did)
 - rust-lang#139353 (Fix `Debug` impl for `LateParamRegionKind`.)
 - rust-lang#139366 (ToSocketAddrs: fix typo)
 - rust-lang#139374 (Use the span of the whole bound when the diagnostic talks about a bound)
 - rust-lang#139378 (Use target-agnostic LLD flags in bootstrap for `use-lld`)
 - rust-lang#139384 (Add `compiletest` adhoc_group for `r? compiletest`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 00f608a into rust-lang:master Apr 5, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 5, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 5, 2025
Rollup merge of rust-lang#139041 - nnethercote:rm-rustc_middle-ty-util-ExplicitSelf, r=BoxyUwU

Remove `rustc_middle::ty::util::ExplicitSelf`.

It's an old (2017 or earlier) type that describes a `self` receiver. It's only used in `rustc_hir_analysis` for two error messages, and much of the complexity isn't used. I suspect it used to be used for more things.

This commit removes it, and moves a greatly simplified version of the `determine` method into `rustc_hir_analysis`, renamed as `get_self_string`. The big comment on the method is removed because it no longer seems relevant.

r? `@BoxyUwU`
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