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

Provide completions for associated types in trait impls #775

Open
TedDriggs opened this issue Jul 25, 2017 · 0 comments · May be fixed by #784
Open

Provide completions for associated types in trait impls #775

TedDriggs opened this issue Jul 25, 2017 · 0 comments · May be fixed by #784
Assignees
Milestone

Comments

@TedDriggs
Copy link
Contributor

TedDriggs commented Jul 25, 2017

pub struct Foo;

impl ::std::str::FromStr for Foo {
    type ~Err = ();
    // ... remainder elided
}

Desired Behavior: When the cursor is at ~ in the example above, calling racer complete should list the associated types for the enclosing trait.

@TedDriggs TedDriggs self-assigned this Jul 25, 2017
TedDriggs added a commit to TedDriggs/racer that referenced this issue Aug 7, 2017
This fix is very similar to the one for trait functions:

1. Look to see if cursor is after a declaration keyword
2. If so, try to find the enclosing trait
3. If trait found, look for trait items of the right type
@TedDriggs TedDriggs linked a pull request Aug 7, 2017 that will close this issue
@TedDriggs TedDriggs modified the milestone: 2.0.11 Aug 7, 2017
TedDriggs added a commit to TedDriggs/racer that referenced this issue Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant