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

Filter and/or de-prioritize trait names in expression context completion #12196

Closed
lnicola opened this issue May 9, 2022 · 7 comments
Closed
Labels
A-completion autocompletion C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now

Comments

@lnicola
Copy link
Member

lnicola commented May 9, 2022

See #12123 (comment).

@lnicola lnicola added A-completion autocompletion S-actionable Someone could pick this issue up and work on it right now C-bug Category: bug labels May 9, 2022
@Veykril
Copy link
Member

Veykril commented May 9, 2022

*Only for traits that don't have assoc items though.

@lnicola
Copy link
Member Author

lnicola commented May 9, 2022

It might still make sense to move down traits without associated constants, since it's not that common to invoke methods like that.

@Veykril
Copy link
Member

Veykril commented May 9, 2022

I wouldn't be so sure about that, Default::default() is very common, From::from/Into::into also sees some use

@flodiebold
Copy link
Member

I wonder, it might be nice to automatically complete Default::default() etc. for traits like this? I.e. have a completion for the full method call?

@flodiebold
Copy link
Member

flodiebold commented May 10, 2022

Or maybe we should just complete Default::$0 instead of Default -- that would apply to all traits in this position 🤔

But for traits with just one member just providing the full thing might still be better.

This should all be configurable though, since I'm sure there are people who will be annoyed by it...

@Veykril
Copy link
Member

Veykril commented May 10, 2022

Ye I think those are some good ideas 👍

@Veykril Veykril self-assigned this Jul 28, 2022
bors added a commit that referenced this issue Jul 28, 2022
fix: Don't complete marker traits in expression position

cc #12196
@Veykril Veykril removed their assignment Feb 8, 2023
@lnicola
Copy link
Member Author

lnicola commented Aug 10, 2024

Mostly fixed.

@lnicola lnicola closed this as completed Aug 10, 2024
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

No branches or pull requests

3 participants