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

fix: impl Trait desugaring in trait objects' assoc constraints #97335

Closed
wants to merge 33 commits into from

Conversation

randomicon00
Copy link
Contributor

@randomicon00 randomicon00 commented May 23, 2022

Issue: #96529

Right now, the tasks that are done:

  • saving the desugaring into an ìmpl_trait_context`.
  • add impl_trait_id to rust_ast::AssocConstraint.

In progress:
The next tasks are a break out of what I am trying to accomplish. A bit different from the original tasks in order to be as precise as possible and help with mentoring.

  • create visit_assoc_constraint in def_collector and create the local def id there by matching with UniversalInDyn context.
  • replace the desugar_to_impl_trait with the associated constraint check.
  • remove the enum rust_ast_lowering::ImplTraitContextand add the vector to LoweringContext.
  • use that vector in the relevant places and retrieve it through the use of with_hir_id_owner.

Not started yet.

  • create a ResolverAstLowering::get_impl_trait_context(LocalDefId) to access the ImplTraitContext value.
  • fix method parameter documentation for lower_fn_decl.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 23, 2022
@rust-highfive
Copy link
Collaborator

r? @wesleywiser

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 23, 2022
@randomicon00
Copy link
Contributor Author

r? @cjgillot

@rust-log-analyzer

This comment has been minimized.

@randomicon00 randomicon00 marked this pull request as draft May 23, 2022 20:38
@randomicon00 randomicon00 changed the title fix: impl Trait desugaring in trait objects fix: impl Trait desugaring in trait objects' assoc constraints May 23, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jun 3, 2022

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

ty.span,
),
ImplTraitContext::Universal(item_def) => {
//| ImplTraitContext::UniversalInDyn(item_def) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
//| ImplTraitContext::UniversalInDyn(item_def) => {
| ImplTraitContext::UniversalInDyn(item_def) => {

This is the correct behaviour here.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jun 17, 2022

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

@cjgillot cjgillot 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 Jun 21, 2022
@Dylan-DPC
Copy link
Member

@randomicon00 what's the status of this?

@randomicon00
Copy link
Contributor Author

randomicon00 commented Nov 6, 2022

@Dylan-DPC Will have an update in the next two weeks.
For now, I still have parts of desugaring logic in hir.

@Dylan-DPC
Copy link
Member

@randomicon00 any updates on this?

@Dylan-DPC
Copy link
Member

Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks

@Dylan-DPC Dylan-DPC closed this Oct 7, 2023
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. 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.

8 participants