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

Associated type binding completions show up when they are not allowed #12165

Closed
jonas-schievink opened this issue May 5, 2022 · 1 comment · Fixed by #12199
Closed

Associated type binding completions show up when they are not allowed #12165

jonas-schievink opened this issue May 5, 2022 · 1 comment · Fixed by #12199
Labels
A-completion autocompletion C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now

Comments

@jonas-schievink
Copy link
Contributor

struct S;
trait Tr<T> {
    type Ty;
}

impl Tr<$0

This suggests using Ty = to specify the associated type, but that's not allowed when implementing a trait, only when using dyn Trait or impl Trait as a type, and when using a trait in a where-clause (perhaps whether it's allowed should be stored in the context).

@jonas-schievink jonas-schievink added A-completion autocompletion S-actionable Someone could pick this issue up and work on it right now C-bug Category: bug labels May 5, 2022
@jonas-schievink
Copy link
Contributor Author

Also they probably shouldn't show up when there are missing generic arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant