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

Register opaque types even when equated with infer variables #99547

Closed

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 21, 2022

note: This doesn't work, but it does fix #99536. Just putting this code up for other people's eyes.

The issue this attempts to solve here is that when we Equate::tys on an inference variable and an opaque type, we end up just storing the opaque type in the type variable table, instead of handling the opaque type as we should be doing.

Thoughts on this? cc @oli-obk in particular. I'd like to work towards a real working solution if possible, if this approach has any merit.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 21, 2022
@rust-highfive

This comment was marked as outdated.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 21, 2022
@compiler-errors
Copy link
Member Author

r? @oli-obk

@compiler-errors
Copy link
Member Author

compiler-errors commented Jul 21, 2022

What the heck. Why did that commit get pushed, lol.

@compiler-errors
Copy link
Member Author

There.

@compiler-errors
Copy link
Member Author

But anyways it seems like the behavior chosen that this PR tries to "fix" was intentional. So, gonna close this.

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_monomorphize v0.0.0 (/checkout/compiler/rustc_monomorphize)
    Checking rustc_passes v0.0.0 (/checkout/compiler/rustc_passes)
    Checking rustc_ast_lowering v0.0.0 (/checkout/compiler/rustc_ast_lowering)
    Checking rustc_save_analysis v0.0.0 (/checkout/compiler/rustc_save_analysis)
error[E0609]: no field `infcx` on type `&mut Equate<'_, '_, 'tcx>`
  --> compiler/rustc_infer/src/infer/equate.rs:84:22
   |
84 |                 self.infcx.super_combine_tys(self, a, b)
   |
   |
   = note: available fields are: `fields`, `a_is_expected`
   |
   |
84 |                 self.fields.infcx.super_combine_tys(self, a, b)

    Checking rustc_resolve v0.0.0 (/checkout/compiler/rustc_resolve)
For more information about this error, try `rustc --explain E0609`.
error: could not compile `rustc_infer` due to previous error

@compiler-errors compiler-errors deleted the cursed-equate-opaque branch August 11, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nightly 2022-06-29 rejects previously compiling code with missing trait implementations
6 participants