feat: completion list suggests methods in the order we most likely want#16044
Closed
mustakimali wants to merge 63 commits intorust-lang:masterfrom
Closed
feat: completion list suggests methods in the order we most likely want#16044mustakimali wants to merge 63 commits intorust-lang:masterfrom
mustakimali wants to merge 63 commits intorust-lang:masterfrom
Conversation
new like functions first
Collaborator
|
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands: The following commits are merge commits: |
This has been warn-by-default for two years now and has already been added to the future-incompat lints in 1.68.
This reverts commit 6d2543b.
…n the macro definition site
Before Private functions have RawVisibility module, but were missed because take_types returned None early. After resolve_visibility returned None, Visibility::Public was set instead and private functions ended up being offered in autocompletion. Choosing such a function results in an immediate error diagnostic about using a private function. After Pattern match of take_types that returns None and query for Module-level visibility from the original_module Fix rust-lang#15134 - tested with a unit test and a manual end-to-end test of building rust-analyzer from my branch and opening the reproduction repository REVIEW Refactor to move scope_def_applicable and check function visibility from a module Please let me know what's the best way to add a unit tests to nameres, which is where the root cause was
colon_complete_preferred_order_relevances
methods in render function
652b132 to
1eac62a
Compare
Collaborator
|
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands: The following commits are merge commits (since this message was last posted): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When typing
MyType::the completion items' order could be re-ordered based on how likely we want to select those:newlike functions to be able to create the type,Self,In this photo, the order is:
newconstructor is firstnew_buildersecond is a builder methodaaaanewis a constructor that takes arguments, is third and is irrespective of its alphabetical order among names.I've dropped my previous idea of highlighting these functions in the rustdoc (rust-lang/rust#107926)