-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: completion list suggests constructor like & builder methods first #16117
Conversation
☔ The latest upstream changes (presumably #16274) made this pull request unmergeable. Please resolve the merge conflicts. |
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: |
c8f9815
to
ad700ed
Compare
1f9e686
to
2464387
Compare
2464387
to
0af14ef
Compare
Thanks! |
☀️ Test successful - checks-actions |
When typing
MyType::
the completion items' order could be re-ordered based on how likely we want to select those:new
like functions to be able to create the type,Self
,In this photo, the order is:
new
constructor is firstnew_builder
second is a builder methodaaaanew
is a constructor that takes arguments, is third and is irrespective of its alphabetical order among names.Another Example using actix
HttpServer
shows preferring constructor withoutself
arg first (thenew
method)I've dropped my previous idea of highlighting these functions in the rustdoc (rust-lang/rust#107926)