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

Welcome opaque types into the fold #92006

Merged
merged 3 commits into from
Jan 14, 2022

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Dec 16, 2021

r? @nikomatsakis because idk who else to bug on the type_op changes

The commits have explanations in them. The TLDR is that

  • 5c46002 stops the "recurse and replace" scheme that replaces opaque types with their canonical inference var by just doing that ahead of time
  • bdeeb07 does not affect anything on master afaict, but since opaque types generate obligations when instantiated, and lazy TAIT instantiates opaque types everywhere, we need to properly handle obligations here instead of just hoping no problematic obligations ever come up.

Sometimes an obligation depends on a later one, so we can't just process them in order like it was done previously.

This is not a problem in our test suite, but there may be ICEs out there and it will definitely be a problem with lazy TAIT.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 16, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 16, 2021
@jackh726
Copy link
Member

This LGTM, but Niko should probably take a look

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jan 11, 2022

📌 Commit bdeeb07 has been approved by nikomatsakis

@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 Jan 11, 2022
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 12, 2022

@bors rollup

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 12, 2022
…he_fold, r=nikomatsakis

Welcome opaque types into the fold

r? `@nikomatsakis` because idk who else to bug on the type_op changes

The commits have explanations in them. The TLDR is that

* 5c46002 stops the "recurse and replace" scheme that replaces opaque types with their canonical inference var by just doing that ahead of time
* bdeeb07 does not affect anything on master afaict, but since opaque types generate obligations when instantiated, and lazy TAIT instantiates opaque types *everywhere*, we need to properly handle obligations here instead of just hoping no problematic obligations ever come up.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 13, 2022
…he_fold, r=nikomatsakis

Welcome opaque types into the fold

r? ``@nikomatsakis`` because idk who else to bug on the type_op changes

The commits have explanations in them. The TLDR is that

* 5c46002 stops the "recurse and replace" scheme that replaces opaque types with their canonical inference var by just doing that ahead of time
* bdeeb07 does not affect anything on master afaict, but since opaque types generate obligations when instantiated, and lazy TAIT instantiates opaque types *everywhere*, we need to properly handle obligations here instead of just hoping no problematic obligations ever come up.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2022
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#90001 (Make rlib metadata strip works with MIPSr6 architecture)
 - rust-lang#91687 (rustdoc: do not emit tuple variant fields if none are documented)
 - rust-lang#91938 (Add `std::error::Report` type)
 - rust-lang#92006 (Welcome opaque types into the fold)
 - rust-lang#92142 ([code coverage] Fix missing dead code in modules that are never called)
 - rust-lang#92277 (rustc_metadata: Stop passing `CrateMetadataRef` by reference (step 1))
 - rust-lang#92334 (rustdoc: Preserve rendering of macro_rules matchers when possible)
 - rust-lang#92807 (Update cargo)
 - rust-lang#92832 (Update RELEASES for 1.58.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b45a819 into rust-lang:master Jan 14, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 14, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 15, 2022
…s_into_the_fold, r=nikomatsakis"

This reverts commit b45a819, reversing
changes made to e045c79.
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.

6 participants