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

feat(exporter/traits): parent bounds on impl and associated types #532

Merged
merged 12 commits into from
Feb 28, 2024

Conversation

W95Psp
Copy link
Collaborator

@W95Psp W95Psp commented Feb 27, 2024

This PR:

  • exporter:
    • decorate the paths to impl expressions with clause_ids;
    • refactor/clean/fixes some code;
    • resolve impl expressions and clauses for parent bounds and associated bounds on impl blocks;
  • engine:
    • renames the trait_ref AST type into trait_goal;
    • introduces impl_ident in the AST;
    • propagate/add the impl idents introduced in the exporter.

In a more high-level view, this PR adds the things missing in the exporter for fully supporting explicit implementation expressions.
I think now we have all the information in hax' AST to extract code with already resolved traits. For instance, we should be able to rework the F* backend so that we don't rely on TC inference on F* side any longer.

@W95Psp W95Psp force-pushed the parent-bounds branch 4 times, most recently from 3d63899 to 148791f Compare February 27, 2024 18:33
@W95Psp W95Psp marked this pull request as ready for review February 27, 2024 18:41
Copy link
Member

@franziskuskiefer franziskuskiefer left a comment

Choose a reason for hiding this comment

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

Thanks

  • I'm not annotating all changes, but please add comments to all code you touch that doesn't have comments yet.
  • Comments/messages like "make more ergonomic" or "update x" are not useful. What is the change doing?
  • There seem to be some renamings in here. Please split out mass changes like this in future.

frontend/exporter/src/types/copied.rs Show resolved Hide resolved
@W95Psp
Copy link
Collaborator Author

W95Psp commented Feb 28, 2024

Thanks for the review!

I added some documentation. For copied.rs, I added minimal comments linking to the "mirrored" item in rustc crates + documenting additions, wdyt?

Yeah, such vague commit messages aren't great. though, here by update owner_id I actually meant that the code is now updating the field owner_id 😅 I should make that more obvious though!

@W95Psp W95Psp added this pull request to the merge queue Feb 28, 2024
@W95Psp W95Psp linked an issue Feb 28, 2024 that may be closed by this pull request
Merged via the queue into main with commit 7a1b8bf Feb 28, 2024
11 checks passed
@W95Psp W95Psp deleted the parent-bounds branch February 28, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Exporter+engine: propagate parent bounds
2 participants