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 TypeVariableOriginKind and ConstVariableOriginKind #123016

Merged
merged 5 commits into from
Apr 16, 2024

Conversation

compiler-errors
Copy link
Member

It's annoying to have to import TypeVariableOriginKind just to fill it with MiscVariable for almost every use. Every other usage other than TypeParameterDefinition wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it.

So let's just remove it, and keep around the only useful thing which is the DefId of the param for var_for_def.

This is based on #123006, which removed the special use of TypeVariableOriginKind::OpaqueInference, which I'm pretty sure I was the one that added.

r? lcnr or re-roll to types

@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 24, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 24, 2024

Some changes occurred in match lowering

cc @Nadrieril

Some changes occurred in need_type_info.rs

cc @lcnr

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Type relation code was changed

cc @compiler-errors, @lcnr

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@rustbot rustbot added the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Mar 24, 2024
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 28, 2024

☔ The latest upstream changes (presumably #123147) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

please make sure to update all relevant comments

after that r=me, a really nice cleanup imo ❤️

@compiler-errors compiler-errors force-pushed the no-type-var-origin branch 2 times, most recently from 4ef1df1 to 7dead92 Compare April 5, 2024 17:37
@lcnr
Copy link
Contributor

lcnr commented Apr 5, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Apr 5, 2024

📌 Commit 7dead92 has been approved by lcnr

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 5, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 6, 2024
…, r=lcnr

Remove `TypeVariableOriginKind` and `ConstVariableOriginKind`

It's annoying to have to import `TypeVariableOriginKind` just to fill it with `MiscVariable` for almost every use. Every other usage other than `TypeParameterDefinition` wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it.

So let's just remove it, and keep around the only useful thing which is the `DefId` of the param for `var_for_def`.

This is based on rust-lang#123006, which removed the special use of `TypeVariableOriginKind::OpaqueInference`, which I'm pretty sure I was the one that added.

r? lcnr or re-roll to types
@matthiaskrgr
Copy link
Member

mh may need another rebase

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 6, 2024
…r=lcnr

Remove `TypeVariableOriginKind` and `ConstVariableOriginKind`

It's annoying to have to import `TypeVariableOriginKind` just to fill it with `MiscVariable` for almost every use. Every other usage other than `TypeParameterDefinition` wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it.

So let's just remove it, and keep around the only useful thing which is the `DefId` of the param for `var_for_def`.

This is based on rust-lang#123006, which removed the special use of `TypeVariableOriginKind::OpaqueInference`, which I'm pretty sure I was the one that added.

r? lcnr or re-roll to types
@bors
Copy link
Contributor

bors commented Apr 6, 2024

⌛ Testing commit 7dead92 with merge dd3b001...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Apr 6, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 6, 2024
@bors
Copy link
Contributor

bors commented Apr 11, 2024

☔ The latest upstream changes (presumably #123762) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Apr 15, 2024

📌 Commit 98890be has been approved by lcnr

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 15, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#123016 (Remove `TypeVariableOriginKind` and `ConstVariableOriginKind`)
 - rust-lang#123462 (Cleanup: Rename `ModSep` to `PathSep`)
 - rust-lang#123603 (Don't even parse an intrinsic unless the feature gate is enabled)
 - rust-lang#123926 (Fix pretty HIR for anon consts in diagnostics)
 - rust-lang#123973 (crashes: readme: add reminder to add Fixes #abcde to prs to automatically close issues.)
 - rust-lang#123984 (sanitizers: Add rustc_sanitizers to triagebot.toml)
 - rust-lang#123989 (Just use `type_dependent_def_id` to figure out what the method is for an expr)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9cc26b5 into rust-lang:master Apr 16, 2024
11 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 16, 2024
Rollup merge of rust-lang#123016 - compiler-errors:no-type-var-origin, r=lcnr

Remove `TypeVariableOriginKind` and `ConstVariableOriginKind`

It's annoying to have to import `TypeVariableOriginKind` just to fill it with `MiscVariable` for almost every use. Every other usage other than `TypeParameterDefinition` wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it.

So let's just remove it, and keep around the only useful thing which is the `DefId` of the param for `var_for_def`.

This is based on rust-lang#123006, which removed the special use of `TypeVariableOriginKind::OpaqueInference`, which I'm pretty sure I was the one that added.

r? lcnr or re-roll to types
github-merge-queue bot pushed a commit to servo/servo that referenced this pull request Jul 30, 2024
* Update for nix

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Update to Rust 1.80.0

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Rename to BindingMode from BindingAnnotation

rust-lang/rust#124047
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove TypeVariableOriginKind

rust-lang/rust#123016
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove TypeVariableOrigin

rust-lang/rust#124955
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove LintDiagnostic::msg

rust-lang/rust#125410

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* common.rs fmt mistake indents

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* trace_in_no_trace.rs remove mistake space

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* trace_in_no_trace.rs remove mistake head space

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

---------

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
github-merge-queue bot pushed a commit to servo/servo that referenced this pull request Aug 7, 2024
* Update for nix

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Update to Rust 1.80.0

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Rename to BindingMode from BindingAnnotation

rust-lang/rust#124047
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove TypeVariableOriginKind

rust-lang/rust#123016
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove TypeVariableOrigin

rust-lang/rust#124955
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove LintDiagnostic::msg

rust-lang/rust#125410

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* common.rs fmt mistake indents

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* trace_in_no_trace.rs remove mistake space

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* trace_in_no_trace.rs remove mistake head space

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Workaround for #32912

It's dirty but it worked on 2000 runs

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
Gae24 pushed a commit to Gae24/servo that referenced this pull request Aug 7, 2024
* Update for nix

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Update to Rust 1.80.0

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Rename to BindingMode from BindingAnnotation

rust-lang/rust#124047
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove TypeVariableOriginKind

rust-lang/rust#123016
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove TypeVariableOrigin

rust-lang/rust#124955
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Remove LintDiagnostic::msg

rust-lang/rust#125410

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* common.rs fmt mistake indents

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* trace_in_no_trace.rs remove mistake space

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* trace_in_no_trace.rs remove mistake head space

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>

* Workaround for servo#32912

It's dirty but it worked on 2000 runs

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants