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

Addressing instance methods in external annotations #165

Merged
merged 12 commits into from
Aug 29, 2024

Conversation

JustusAdam
Copy link
Collaborator

@JustusAdam JustusAdam commented Aug 28, 2024

What Changed?

This PR expands the capabilities of the resolution code used for external markers and the --analyze command line argument to handle more complex Rust paths, such as <Type as Trait>::method.

We reuse rustcs own parser to interpret the user-supplied string as a "path".

Why Does It Need To?

Currently external markers and the --analyze command line argument are limited to simple paths (e.g. std::vec::Vec) and cannot target methods of a trait impl. This PR removes that limitation.

Checklist

  • Need to handle generics on the self-ty in the qualified case or at least error.
  • Need to handle the qualified case without a trait
  • Need to re-enable otype annotation.
  • Above description has been filled out so that upon quash merge we have a
    good record of what changed.
  • New functions, methods, types are documented. Old documentation is updated
    if necessary
  • Documentation in Notion has been updated
  • Tests for new behaviors are provided
    • New test suites (if any) ave been added to the CI tests (in
      .github/workflows/rust.yml) either as compiler test or integration test.
      Or justification for their omission from CI has been provided in this PR
      description.

@JustusAdam JustusAdam marked this pull request as ready for review August 29, 2024 17:53
@JustusAdam JustusAdam merged commit abb1bb1 into main Aug 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant